#40290 [Opn->Asn]: strtotime() returns unexpected result with particular timezone offset
| From: | tony2001@php.net | Date: | Tue, 30 Jan 2007 20:45:12 +0000 |
| Subject: | #40290 [Opn->Asn]: strtotime() returns unexpected result with particular timezone offset | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-108262@lists.php.net to get a copy of this message | ||
ID: 40290
Updated by: tony2001@php.net
Reported By: patrick at papaq dot org
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Win32/CentOS/Fedora
PHP Version: 5.2.0
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2007-01-30 20:35:24] patrick at papaq dot org
Description:
------------
When using strtotime() to parse a date string with a certain timezone
offset it returns an incorrect result.
I got this kind of a timezone "Tue, 30 Jan 2007 12:27:00 +0001" from an
rss feed. Although they actually mean "+0100" strtotime() should return
a time with one minute difference, not 1 month.
Reproduce code:
---------------
<?php
putenv('TZ=Pacific/Auckland');
echo date("Y-m-d H:i:s\n",strtotime("Tue, 30 Jan 2007 12:27:00
+0001"));
?>
Expected result:
----------------
2007-01-31 01:26:00
Actual result:
--------------
2007-03-04 13:27:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40290&edit=1