When microtime(true) returns a whole number, then the parsing fails.
This patch makes sure, that the value can always be parsed correctly.
This commit is contained in:
parent
5e3710d746
commit
7fce06b3f3
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue