ID: 41653 Updated by: [EMAIL PROTECTED] Reported By: stvanhouwelingen at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux PHP Version: 5.2.3 New Comment:
No, that is not correct. PHP 5.1 have much better support for timezones and it can now distinguish between Germany and the Netherlands for this. Previous Comments: ------------------------------------------------------------------------ [2007-06-11 19:36:41] stvanhouwelingen at gmail dot com If I use date_default_timezone_set('Europe/Amsterdam') then the output is correct. However, I would expect that PHP5 generates the same results as PHP4 on the same machine with the same php.ini? ------------------------------------------------------------------------ [2007-06-11 18:47:26] stvanhouwelingen at gmail dot com Hi Derick The output of echo date_default_timezone_get(), "\n"; is "Europe/Berlin" This works only with PHP5, of course. Best regards, Steven. ------------------------------------------------------------------------ [2007-06-11 17:54:35] [EMAIL PROTECTED] What is the output of: echo date_default_timezone_get(), "\n"; ------------------------------------------------------------------------ [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