#30678 [NEW]: strtotime() has problems with Halloween

From: Date: Wed, 03 Nov 2004 19:27:23 +0000
Subject: #30678 [NEW]: strtotime() has problems with Halloween
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68662@lists.php.net to get a copy of this message
From: alexbo at delphian dot org Operating system: RedHat 9 (Kernel 2.4.20-20.9smp) PHP version: 5.0.1 PHP Bug Type: Date/time related Bug description: strtotime() has problems with Halloween Description: ------------ Halloween, according to strtotime(), is both Sunday and Monday this year. I haven't checked other years, but I just ran into this. Uh... that's all I've got for you. Reproduce code: --------------- echo("<p>"); echo(date("d_M_y",mktime(0,0,0,10,30,04))); echo("</p><p>"); echo(date("d_M_y",strtotime("tuesday",mktime(0,0,0,10,30,04)))); echo("</p><p>"); echo(date("d_M_y",strtotime("monday",mktime(0,0,0,10,30,04)))); echo("</p><p>"); echo(date("d_M_y",strtotime("sunday",mktime(0,0,0,10,30,04)))); echo("</p>"); Expected result: ---------------- 30_Oct_04 02_Nov_04 01_Nov_04 31_Oct_04 Actual result: -------------- 30_Oct_04 01_Nov_04 31_Oct_04 31_Oct_04 -- Edit bug report at http://bugs.php.net/?id=30678&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30678&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30678&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30678&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30678&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30678&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30678&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30678&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30678&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30678&r=support Expected behavior: http://bugs.php.net/fix.php?id=30678&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30678&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30678&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30678&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30678&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30678&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30678&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30678&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30678&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30678&r=mysqlcfg

« previous php.bugs (#68662) next »