Commit 7fce06b3 authored by Christian Schnidrig's avatar Christian Schnidrig
Browse files

When microtime(true) returns a whole number, then the parsing fails.

This patch makes sure, that the value can always be parsed correctly.
parent 5e3710d7
......@@ -73,7 +73,7 @@ class OC_Log_Owncloud {
} catch (Exception $e) {
$timezone = new DateTimeZone('UTC');
}
$time = DateTime::createFromFormat("U.u", microtime(true), $timezone);
$time = DateTime::createFromFormat("U.u", number_format(microtime(true), 4, ".", ""), $timezone);
if ($time === false) {
$time = new DateTime(null, $timezone);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment