#26970 [Opn]: microtime() <> time() after changing the system time

From: Date: Mon, 19 Jan 2004 21:08:55 +0000
Subject: #26970 [Opn]: microtime() <> time() after changing the system time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53606@lists.php.net to get a copy of this message
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

« previous php.bugs (#53606) next »