/ Published in: Other
Expand |
Embed | Plain Text
list($micro, $Unixtime) = explode(" ", microtime()); $sec = $micro + date("s", $Unixtime); $sec = mb_ereg_replace(sprintf('%d',$sec),"",($micro + date("s", $Unixtime))); echo date("Y-m-d H:i:s", $Unixtime).$sec;
Comments
Subscribe to comments
You need to login to post a comment.

Euhm... so what does this do exactly...
I could spend a lot of time debugging this, but it's just being friendly to post an explanation along with your code...
So I tried it out and this piece of code will always print the current time in the MySQL DateTime format. Nice code, favorited.