|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-27 16:47 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2015-08-27 16:47 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
Description: ------------ PHP will accept invalid DST-related time zone abbreviations, e.g. daylight savings time when daylight savings time cannot be in effect on the given date; subsequent operations on the returned object may produce invalid results. This should produce an error. Test script: --------------- $dt = new DateTime('1980-01-01 15:00:00 PDT'); print_r($dt); $dt->modify('+1 hour'); print_r($dt); Expected result: ---------------- EXPECTED output should be an error. Actual result: -------------- DateTime Object ( [date] => 1980-01-01 15:00:00 [timezone_type] => 2 [timezone] => PDT ) DateTime Object ( [date] => 1980-01-01 15:00:00 [timezone_type] => 2 [timezone] => PDT ) Note that PDT is invalid for the given date, and the modify() call didn't work and also didn't throw an error.