#41653 [Opn->Fbk]: Daylight saving start date not correct
| From: | derick@php.net | Date: | Mon, 11 Jun 2007 17:54:35 +0000 |
| Subject: | #41653 [Opn->Fbk]: Daylight saving start date not correct | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-113657@lists.php.net to get a copy of this message | ||
ID: 41653
Updated by: derick@php.net
Reported By: stvanhouwelingen at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
What is the output of:
echo date_default_timezone_get(), "\n";
Previous Comments:
------------------------------------------------------------------------
[2007-06-11 16:13:42] stvanhouwelingen at gmail dot com
Description:
------------
In PHP 5.2.3 the daylight saving start date for time zone The
Netherlands is not correct for the years 1977, 1978 and 1979
This used to work correctly in PHP 4.
Below script should show 23 hours time difference for all given dates,
but somehow this is not happening in 1977, 1978 and 1979.
Reproduce code:
---------------
<?
$dates = array(
'1977-04-03',
'1978-04-02',
'1979-04-01',
'1980-04-06',
'1981-03-29',
'1982-03-28',
);
foreach($dates as $date)
{
$ts1 = strtotime($date);
$ts2 = strtotime('+1 day',$ts1);
$diff = ($ts2-$ts1)/3600;
echo "$date => $diff\n";
}
?>
Expected result:
----------------
1977-04-03 => 23
1978-04-02 => 23
1979-04-01 => 23
1980-04-06 => 23
1981-03-29 => 23
1982-03-28 => 23
Actual result:
--------------
1977-04-03 => 24
1978-04-02 => 24
1979-04-01 => 24
1980-04-06 => 23
1981-03-29 => 23
1982-03-28 => 23
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41653&edit=1