|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-05-23 17:22 UTC] derick@php.net
-Status: Open
+Status: Not a bug
[2013-05-23 17:22 UTC] derick@php.net
[2013-05-23 18:17 UTC] istvan dot dani at gmail dot com
[2013-05-23 18:29 UTC] derick@php.net
-Package: Date/time related
+Package: Documentation problem
[2013-05-23 18:29 UTC] derick@php.net
[2013-05-23 18:31 UTC] aharvey@php.net
-Status: Not a bug
+Status: Assigned
-Assigned To:
+Assigned To: aharvey
[2013-05-23 18:31 UTC] aharvey@php.net
[2013-05-23 18:38 UTC] aharvey@php.net
[2013-05-23 18:39 UTC] aharvey@php.net
-Status: Assigned
+Status: Closed
-Type: Bug
+Type: Documentation Problem
[2013-05-23 18:39 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 11:00:01 2025 UTC |
Description: ------------ Europe/Budapest timezone offset is +1, and +2 in DST. Transition to DST is at 2013-03-31 01:00:00 UTC/GMT. According to this, locale time should not exists between 02:00:00 and 03:00:00, and must not be accepted as valid time. Test script: --------------- try { $wrong_date = new DateTime("2013-03-31 02:30:00", new DateTimeZone("Europe/Budapest")); } catch (Exception $e) { echo $e->getMessage(); } print "Wrong date in local timezone: " . $wrong_date->format("Y-m-d H:i:s"); $wrong_date->setTimezone(new DateTimeZone("UTC")); print "<br />Converting to UTC: " . $wrong_date->format("Y-m-d H:i:s"); $wrong_date->setTimezone(new DateTimeZone("Europe/Budapest")); print "<br />Converting back to locale timezone: " . $wrong_date->format("Y-m-d H:i:s"); Expected result: ---------------- Get an exception. Actual result: -------------- Wrong date in local timezone: 2013-03-31 02:30:00 Converting to UTC: 2013-03-31 01:30:00 Converting back to locale timezone: 2013-03-31 03:30:00