PHP 4.0 Bug #9966 Updated: date(today) and date(tomorrow) return twice the same date

From: Date: Mon, 26 Mar 2001 09:22:37 +0000
Subject: PHP 4.0 Bug #9966 Updated: date(today) and date(tomorrow) return twice the same date
Groups: php.dev 
Request: Send a blank email to php-dev+get-49939@lists.php.net to get a copy of this message
ID: 9966 User Update by: leonardo@pcnet.ro Status: Closed Bug Type: Date/time related Description: date(today) and date(tomorrow) return twice the same date yeah, right... but what is the cure for this situation ? i mean i don't want to screw up my scripts because a common daylight saving time. i don't know if you know what i mean... it's just... silly Previous Comments: --------------------------------------------------------------------------- [2001-03-25 10:21:32] jah@php.net You have just discovered daylight savings time... --------------------------------------------------------------------------- [2001-03-24 04:44:12] leonardo@pcnet.ro I made a script that loops through a week ahead (starting from 19 of March 2001 and includind the week of 19-25 of March 2001) and reads the data from a database according to the date. I've noticed the '2001-03-24' is returned twice using the following script: for($i = 0; $i < 6; $i++) { $next_date = date("Y-m-d", mktime(0,0,0,date("m"),date("d")+$i,date("Y"))); print $next_date; } The script returns the same date with PHP 4.0.4 on IIS and Apache for Windows. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=9966

« previous php.dev (#49939) next »