|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-21 16:13 UTC] zippidyzap at gmail dot com
-Status: Open
+Status: Closed
[2012-11-21 16:13 UTC] zippidyzap at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 10:00:01 2025 UTC |
Description: ------------ DateTimeZone::listAbbreviations() reports incorrect. When executed on (server time) 2012-11-20T00:00:00-08:00, reported that offset for America/Los_Angeles as -25200. DateTimeZone::getTransitionOffsets reports the offset correctly as -28800. Test script: --------------- <?php $var = DateTimeZone::listAbbreviations(); print_r($var['pdt'][0]); $timezone = new DateTimeZone("America/Los_Angeles"); print_r($timezone->getTransitions(time(), time())); ?> Expected result: ---------------- Array ( [dst] => 0 [offset] => -28800 [timezone_id] => America/Los_Angeles ) Array ( [0] => Array ( [ts] => 1353457792 [time] => 2012-11-21T00:29:52+0000 [offset] => -28800 [isdst] => [abbr] => PST ) ) Actual result: -------------- Array ( [dst] => 1 [offset] => -25200 [timezone_id] => America/Los_Angeles ) Array ( [0] => Array ( [ts] => 1353457792 [time] => 2012-11-21T00:29:52+0000 [offset] => -28800 [isdst] => [abbr] => PST ) )