ID:               43527
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mattis at xait dot no
-Status:           Assigned
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: Windows XP SP2
 PHP Version:      5.2.5
 Assigned To:      derick
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

The script now returns:
+10:00
(And you really should not be using the "Etc/*" style timezone
identifiers.


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

[2007-12-07 09:59:22] [EMAIL PROTECTED]

There is a bug here, but the expected result is not necessarily what
you say it should be. Because there is no real timezone , it probably
should return false.

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

[2007-12-07 09:55:51] mattis at xait dot no

Description:
------------
When creating a DateTime from a timestamp (i.e. date('r)) it will
report the TimeZone of the environment it was created in and not the
timezone in the timestamp.

Reproduce code:
---------------
<?php
date_default_timezone_set("Etc/GMT+1");
$datetime = new DateTime('Fri, 07 Dec 2007 19:05:14 +1000');
echo $datetime->getTimezone()->getName(), "\n";

Expected result:
----------------
Etc/GMT-10

Actual result:
--------------
Etc/GMT+1


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


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

Reply via email to