From: shruti224 at yahoo dot com Operating system: ES4 PHP version: 5.2.0 PHP Bug Type: Date/time related Bug description: Incorrect output from strtotime, when timestr is used with a relative term this
Description: ------------ Sample script to demonstrate the issue: <?php print "14:00:0 UTC this Friday [" . strtotime("14:00:0 UTC this Friday") . "]\n"; print "this Friday UTC [" . strtotime("this Friday UTC") . "]\n"; print "now UTC from strtotime [" . strtotime("now UTC") . "]\n"; ?> When I used this same script with : "PHP 5.0.5 (cli) (built: Oct 29 2006 22:42:15) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies" and my System's date being: # date Fri Jan 5 14:21:38 EST 2007 I got the correct desired output, which is as follows: 14:00:0 UTC this Friday [1168005600] this Friday UTC [1167955200] now UTC from strtotime [1168006899] After upgrading to PHP 5.2 "PHP 5.2.0 (cli) (built: Jan 2 2007 12:44:27) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies" and system's date now being # date Fri Jan 5 14:23:00 EST 2007 The same script as above generated the following incorrect output: 14:00:0 UTC this Friday [1167955200] this Friday UTC [1167955200] now UTC from strtotime [1168006981] By the look of it, it seems as if it ignores the time string completely. Please let me know, if I need to provide any further information. -- Edit bug report at http://bugs.php.net/?id=40037&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40037&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40037&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40037&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40037&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40037&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40037&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40037&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40037&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40037&r=support Expected behavior: http://bugs.php.net/fix.php?id=40037&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40037&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40037&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40037&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40037&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40037&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40037&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40037&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40037&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40037&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40037&r=mysqlcfg