From: pmurray at nevada dot net dot nz Operating system: Gentoo Linux 2.6.8 - Opteron PHP version: 4.3.8 PHP Bug Type: Date/time related Bug description: strtotime returning huge timestamps instead of -1
Description: ------------ When using strtotime(), it returns a bogus timestamp instead of -1. Gentoo 64bit (Opteron) 2004.2, Glibc 2.3.4, PHP 4.3.8; strtotime(time()) returns 3396548642400 Gentoo 32bit (Pentium 4) 2004.2, Glibc 2.3.3, PHP 4.3.8 returns -1 FreeBSD 32bit, PHP 4.3.8 and 5.0.1 returns -1 This causes the examples in the date_format modifier page in the Smarty documentation to fail. IE {$smarty.now|date_format:"%Y"} Could this be related to being on a 64bit platform? Reproduce code: --------------- strtotime(time()); Expected result: ---------------- Return -1 Actual result: -------------- Return 3396548642400 -- Edit bug report at http://bugs.php.net/?id=30215&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30215&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30215&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30215&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30215&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30215&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30215&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30215&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30215&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30215&r=support Expected behavior: http://bugs.php.net/fix.php?id=30215&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30215&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30215&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30215&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30215&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30215&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30215&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30215&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30215&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30215&r=mysqlcfg