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

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.


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

[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