#36230 [NEW]: strtotime returns odd timestamp with empty parameter

From: Date: Tue, 31 Jan 2006 14:54:09 +0000
Subject: #36230 [NEW]: strtotime returns odd timestamp with empty parameter
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92706@lists.php.net to get a copy of this message
From: hancoque at gmx dot de Operating system: Linux/Windows PHP version: 4.4.2 PHP Bug Type: *General Issues Bug description: strtotime returns odd timestamp with empty parameter Description: ------------ When calling strtotime with an empty parameter it doesn't return an equivalent of time() but a timestamp that is missing hours, minutes and seconds (current day at 12:00 AM). I found it in 4.4.1 and checked if it still exists in 4.4.2, which it does. The problem occurs on the server of my webhoster (Linux) and on my test server at home (Windows). Reproduce code: --------------- echo strtotime(""); Expected result: ---------------- 1138718685 Actual result: -------------- 1138662000 -- Edit bug report at http://bugs.php.net/?id=36230&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36230&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36230&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36230&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36230&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36230&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36230&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36230&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36230&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36230&r=support Expected behavior: http://bugs.php.net/fix.php?id=36230&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36230&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36230&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36230&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36230&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36230&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36230&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36230&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36230&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36230&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36230&r=mysqlcfg

« previous php.bugs (#92706) next »