ID:               35983
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim at komta dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Windows XP Pro, Server 2003
 PHP Version:      5.1.2
-Assigned To:      
+Assigned To:      derick
 New Comment:

Assigned to the date man.


Previous Comments:
------------------------------------------------------------------------

[2006-01-12 19:51:13] tim at komta dot com

Description:
------------
Prior to PHP 5.1.2 (potentially earlier, just only noticed it)
strtotime(), when used with the optional 'now' argument, would return
the time using the full 'now'.  Now it returns 00:00 on the date of the
'now', ignoring hours, minutes, and seconds.

Reproduce code:
---------------
$this_morning   = strtotime('today 00:00:00');
$tonight                = strtotime('today 23:59:59');

echo date('m/d Hi', strtotime('yesterday', $this_morning)).'<br/>';
echo date('m/d Hi', strtotime('yesterday', $tonight)).'<br/>';

Expected result:
----------------
(as of 2005-01-12):

01/11 0000
01/11 2359

Actual result:
--------------
(as of 2005-01-12):

01/11 0000
01/11 0000


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35983&edit=1

Reply via email to