#25891 [NEW]: strtotime() returns wrong timestamp

From: Date: Thu, 16 Oct 2003 20:00:48 +0000
Subject: #25891 [NEW]: strtotime() returns wrong timestamp
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-49104@lists.php.net to get a copy of this message
From: will at powerplantmedia dot com Operating system: Red Hat PHP version: 4.3.3 PHP Bug Type: Date/time related Bug description: strtotime() returns wrong timestamp Description: ------------ strtotime() returns the wrong timestamp. i cannot find a pattern to the errors. './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--enable-magic-quotes' '--with-mysql=/usr' '--with-pear' '--with-pgsql=/usr' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' Reproduce code: --------------- echo date("l",strtotime("1 Tuesday",1066323000))." ".strtotime("1 Tuesday",1066323000)."<br>"; echo date("l",strtotime("2 Tuesday",1066323000))." ".strtotime("2 Tuesday",1066323000)."<br>"; echo date("l",strtotime("+1 week",strtotime("Tuesday",1066323000)))." ".strtotime("Tuesday",1066323000); Expected result: ---------------- Tuesday 1066712400 Tuesday 1067361000 Tuesday 1066712400 Actual result: -------------- Tuesday 1066712400 Monday 1067317200 Tuesday 1066712400 -- Edit bug report at http://bugs.php.net/?id=25891&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25891&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25891&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25891&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25891&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25891&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25891&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25891&r=support Expected behavior: http://bugs.php.net/fix.php?id=25891&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25891&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25891&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25891&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25891&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25891&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25891&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25891&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25891&r=float

« previous php.bugs (#49104) next »