ID: 22782 Updated by: [EMAIL PROTECTED] Reported By: ameoba32 at riscom dot net -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: W2K PHP Version: 4.3.1 New Comment:
We are happy to tell you that you just discovered Daylight Savings Time. For more information see: http://webexhibits.org/daylightsaving/b.html Instead of using mktime/date consider using gmmktime and gmdate which do not suffer from DST. This is also documented in the manual. Previous Comments: ------------------------------------------------------------------------ [2003-03-19 04:12:32] patrick at sorrynospam dot org that seems to be correct though. remember that: 333: 01:00:00 27-02-2003 334: 01:00:00 28-02-2003 !!!! 335: 01:00:00 01-03-2003 see: for($i=1; $i < 400; $i++){ echo date("$i: H:i:s d-m-Y", mktime(1,0,0,4,$i,2002))."<BR>\n"; } ------------------------------------------------------------------------ [2003-03-19 02:57:20] ameoba32 at riscom dot net echo date("H:i:s d-m-Y", mktime(0,0,0,4,364,2002))."\n"; echo date("H:i:s d-m-Y", mktime(1,0,0,4,364,2002))."\n"; prints this result: 01:00:00 30-03-2003 01:00:00 30-03-2003 364 is magic day number :) all other days works perfect. thank you. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22782&edit=1