ID:               48977
 Updated by:       der...@php.net
 Reported By:      cpriest at warpmail dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Vista 64-Bit
 PHP Version:      5.3.0
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is not a bug. First of all, *both* of those timezones are only
there for backwards compatibility (see the big warning at
http://uk.php.net/manual/en/timezones.others.php). Secondly, the
timezone database's version of Etc/GMT[+-][0-9]+ work the other way
around where + means - and thirdly US/Central is currently on GMT-5
hence the 11 hour difference between the output:

07/19/2009 16:32:58 CDT
07/20/2009 03:32:58 GMT-6



Previous Comments:
------------------------------------------------------------------------

[2009-07-19 19:40:55] cpriest at warpmail dot net

Description:
------------
When initializing two new DateTime objects using equivalent
DateTimeZone()'s of US/Central and Etc/GMT-6, the result is incorrect

Reproduce code:
---------------
$objTime = new DateTime('now', new DateTimeZone('US/Central'));
echo $objTime->format('m/d/Y H:i:s T')."\r\n";
$objTime = new DateTime('now', new DateTimeZone('Etc/GMT-6'));
echo $objTime->format('m/d/Y H:i:s T')."\r\n";


Expected result:
----------------
The same timestamp on two lines (with different TimeZone specifiers)

Actual result:
--------------
Different timestamps.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48977&edit=1

Reply via email to