]> granicus.if.org Git - php/commit
Fixed "Forward Transition" construction of DateTime objects.
authorDerick Rethans <github@derickrethans.nl>
Sun, 31 Mar 2013 17:11:35 +0000 (18:11 +0100)
committerDerick Rethans <github@derickrethans.nl>
Thu, 28 Nov 2013 12:02:35 +0000 (12:02 +0000)
commit44a9e6b4843de686eab2e2bfa66bdf17ed685d7e
treedbd4a05016092ad61dec6b1e31862d7944eabda1
parentfb0c2cf2245838cba1bd9318925d67a127c7b085
Fixed "Forward Transition" construction of DateTime objects.

This fixes the issue in
https://wiki.php.net/rfc/datetime_and_daylight_saving_time#forward_transitions
There is a period during transition to DST where a time (such as 02:30) does
not exist. PHP already calculated the correct timestamp for this, but failed to
"rounded forward" to the existing correct hour value.
ext/date/php_date.c
ext/date/tests/forward-transition-construction.phpt [new file with mode: 0644]