ID:               26970
 User updated by:  TomSoftware at gmx dot de
-Summary:          microtime() <> time()
 Reported By:      TomSoftware at gmx dot de
 Status:           Open
 Bug Type:         Date/time related
 Operating System: win2k
 PHP Version:      4.3.4
 New Comment:

Sorry (it's only a small bug)

I had change my system time by +1 day
Result: Only time() returns the new time. Microtime() returns the old
time.

Regards Thomas


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

[2004-01-19 15:38:32] TomSoftware at gmx dot de

Description:
------------
The command time() and the microtime() command return a different
value.
It seems to be one day different (60s * 60 * 24 = 86400).

Perhaps it's a Time zone problem (Germany +1h but not +1Day).


Regards Thomas


Reproduce code:
---------------
<?PHP

echo time() ."<br>";

list($usec, $sec) = explode(" ",microtime()); 
echo $sec ."<br>";

echo (time() - $sec) /60 /60 /24;  //-- = 1 Day

?>

Expected result:
----------------
time() == microtime() 

Actual result:
--------------
time() == (microtime()+86400)


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


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

Reply via email to