|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-03-30 15:45 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
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