ID: 28209 Comment by: wb at pro-net dot co dot uk Reported By: gamin at centras dot lt Status: Open Bug Type: Date/time related Operating System: WinXP HE SP1 PHP Version: 5.0.0RC2 New Comment:
Im seeing the same thing on FreeBSD 5 with PHP5 rc2. code: <?php $strtime = strtotime('now'); printf(' Now: %11s %s Str time: %11s %s ' , time() , date('d M Y @ H:i:s ') , $strtime , date('d M Y @ H:i:s ', $strtime) ); ?> Expected: Now: 1084875653 18 May 2004 @ 11:20:53 Str time: 1084875653 18 May 2004 @ 11:20:53 Actual: Now: 1084875653 18 May 2004 @ 11:20:53 Str time: 1084834800 18 May 2004 @ 00:00:00 Previous Comments: ------------------------------------------------------------------------ [2004-04-28 21:06:33] gamin at centras dot lt Description: ------------ Simple script... doesn't matter how much time i run it - strototime("now") produces same result for whole day. On next month day it produces same result. Seems i didn't have any problem on RC1. Reproduce code: --------------- $str = "now"; $timestamp = strtotime($str); echo "$str == " . date('l dS of F Y h:i:s A', $timestamp) . "<br />\n"; $timestamp = time(); echo "Good is " . date('l dS of F Y h:i:s A', $timestamp) . "<br />\n"; Expected result: ---------------- now == Wednesday 28th of April 2004 10:02:54 PM Good is Wednesday 28th of April 2004 10:02:54 PM Actual result: -------------- now == Wednesday 28th of April 2004 12:00:00 AM Good is Wednesday 28th of April 2004 10:02:54 PM ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28209&edit=1