|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-05-06 20:48 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2015-05-06 20:48 UTC] cmb@php.net
[2015-05-06 21:11 UTC] dbaley at xcastlabs dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 07:00:01 2025 UTC |
Description: ------------ The PDT timezone is returning -0800 when it should be -0700. Test script: --------------- <?php $d = new DateTime('NOW', new DateTimeZone('PST')); echo $d->format('Y-m-d h:m:s e O') . "\n"; $d = new DateTime('NOW', new DateTimeZone('PDT')); echo $d->format('Y-m-d h:m:s e O') . "\n"; $d = new DateTime('NOW', new DateTimeZone('America/Los_Angeles')); echo $d->format('Y-m-d h:m:s e O') . "\n"; ?> Expected result: ---------------- Expected correct output: 2015-05-05 01:05:08 PST -0800 2015-05-05 01:05:08 PDT -0700 2015-05-05 02:05:08 America/Los_Angeles -0700 Actual result: -------------- Given incorrect output: 2015-05-05 01:05:08 PST -0800 2015-05-05 01:05:08 PDT -0800 2015-05-05 02:05:08 America/Los_Angeles -0700