Bug #13789 Updated: strtotime wrong interpretation of GMT dates
| From: | derick@php.net | Date: | Sat, 27 Oct 2001 17:47:10 +0000 |
| Subject: | Bug #13789 Updated: strtotime wrong interpretation of GMT dates | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69149@lists.php.net to get a copy of this message | ||
ID: 13789
Updated by: derick
Reported By: cox@idecnet.com
Old Status: Assigned
Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.0.6
Old Assigned To: derick
Assigned To:
New Comment:
Fixed in CVS
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-10-22 14:44:10] cox@idecnet.com
<?php
// format got from a PostgreSQL datetime column type
$date = '2001-10-22 21:19:58+02';
$stamp = strtotime($date);
$conv = date('d/m/Y H:i:s', $stamp);
echo "$date\n$conv\n";
?>
Output:
2001-10-22 21:19:58+02
22/10/2001 23:17:58
It is adding 2 hours and substracting 2 minutes in all the cases (tested with more $date values).
Tomas V.V.Cox
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13789&edit=1