ID: 15029 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: *General Issues Operating System: Windows NT PHP Version: 4.0.6 New Comment:
Yeah, cause that is the date on which summertime becomes wintertime (daylight savings time). Not a bug > bogus Previous Comments: ------------------------------------------------------------------------ [2002-01-14 09:50:18] [EMAIL PROTECTED] The underlying code produces a bug in the time calculation of "mktime". The 28th October 2001 has got 25 hours!!! <? function string2date($dat) { $resu = substr($dat,6,4).substr($dat,3,2).substr($dat,0,2); return $resu; }; $date = "25.10.2001"; $stDate4 = "30.10.2001"; $day = substr($date,0,2); $month = substr($date,3,2); $year = substr($date,6,4); $current_date = mktime (0,0,0,$month,$day,$year); while ($date != $stDate4) { // add 1 day = 86400 seconds to the timestamp $current_date = $current_date + 86400; $date = date ("d.m.Y",$current_date); $Date = string2date($date); /* // this overrides the bug if ($first_date == $Date) { $current_date = $current_date + 86400; $date = date ("d.m.Y",$current_date); $Date = string2date($date); } */ echo "$Date<br>"; } ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15029&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]