ID: 40960 Updated by: [EMAIL PROTECTED] Reported By: dave at dtracorp dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Fedora Core 5 PHP Version: 5.2.1 New Comment:
AFAIK Melbourne is either GMT+10 or GMT+11, this is what the TZ database says: Australia/Melbourne Sat Oct 28 15:59:59 2006 UTC = Sun Oct 29 01:59:59 2006 EST isdst=0 gmtoff=36000 Australia/Melbourne Sat Oct 28 16:00:00 2006 UTC = Sun Oct 29 03:00:00 2006 EST isdst=1 gmtoff=39600 Australia/Melbourne Sat Mar 24 15:59:59 2007 UTC = Sun Mar 25 02:59:59 2007 EST isdst=1 gmtoff=39600 Australia/Melbourne Sat Mar 24 16:00:00 2007 UTC = Sun Mar 25 02:00:00 2007 EST isdst=0 gmtoff=36000 Australia/Melbourne Sat Oct 27 15:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 EST isdst=0 gmtoff=36000 Australia/Melbourne Sat Oct 27 16:00:00 2007 UTC = Sun Oct 28 03:00:00 2007 EST isdst=1 gmtoff=39600 Australia/Melbourne Sat Mar 29 15:59:59 2008 UTC = Sun Mar 30 02:59:59 2008 EST isdst=1 gmtoff=39600 Australia/Melbourne Sat Mar 29 16:00:00 2008 UTC = Sun Mar 30 02:00:00 2008 EST isdst=0 gmtoff=36000 and also: http://www.worldtimezone.com/time/wtzresult.php?CiID=1225&forma=24h Please be aware that London is currently NOT on GMT/UTC, but on BST/UTC+1. Previous Comments: ------------------------------------------------------------------------ [2007-03-30 14:58:55] dave at dtracorp dot com Description: ------------ the normal timestamp offset from gmt for melbourne, australia is 36 000 seconds. currently, the offset is 32 400 seconds, as we just clicked off daylight savings time. so at midnight 2007/03/30 gmt, it should be 9am 2007/03/31. The DateTime object is displaying the correct time, but the getOffset() method is giving the incorrect offset. it should be returning 32 400, it is incorrectly returning 36 000. Reproduce code: --------------- $gmtTz = new DateTimeZone("Europe/London"); $localTz = new DateTimeZone('Australia/Melbourne'); $gmtDt = new DateTime("now", $gmtTz); $localDt = new DateTime("now", $localTz); echo $localTz->getOffset($gmtDt); Expected result: ---------------- 32400 Actual result: -------------- 36000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40960&edit=1