From:             stvanhouwelingen at gmail dot com
Operating system: Linux
PHP version:      5.2.3
PHP Bug Type:     Date/time related
Bug description:  Daylight saving start date not correct

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 bug report at http://bugs.php.net/?id=41653&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41653&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41653&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41653&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41653&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41653&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41653&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41653&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41653&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41653&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41653&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41653&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41653&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41653&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41653&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41653&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41653&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41653&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41653&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41653&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41653&r=mysqlcfg

Reply via email to