#33536 [Asn]: strtotime defaults to now even on non time string

From: Date: Fri, 01 Jul 2005 15:25:17 +0000
Subject: #33536 [Asn]: strtotime defaults to now even on non time string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81271@lists.php.net to get a copy of this message
ID: 33536 User updated by: bo at theaddedones dot com Reported By: bo at theaddedones dot com Status: Assigned Bug Type: Date/time related Operating System: OS X PHP Version: 5CVS-2005-07-01 (dev) Assigned To: derick New Comment: oops sorry if i duped a bug (could not find one like it yet) thanks for your time Previous Comments: ------------------------------------------------------------------------ [2005-07-01 17:17:07] derick@php.net This is already on my todo list... ------------------------------------------------------------------------ [2005-07-01 17:12:39] bo at theaddedones dot com Description: ------------ best by example ---snip--- print strtotime("monkey") ."\n"; print date("Y-m-d", strtotime("monkey")) ."\n"; exit; ---snip--- OUTPUT 1120230396 2005-07-01 --- who knew that monkey meant 'now' (it also defaults to now on various other strings) Reproduce code: --------------- <?php print strtotime("monkey") ."\n"; print date("Y-m-d", strtotime("monkey")) ."\n"; exit; ?> Expected result: ---------------- i expect to see 'false' Actual result: -------------- 1120230396 2005-07-01 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33536&edit=1

« previous php.bugs (#81271) next »