diff options
author | Christian Schnidrig <christian.schnidrig@switch.ch> | 2015-12-22 15:06:32 +0100 |
---|---|---|
committer | Christian Schnidrig <christian.schnidrig@switch.ch> | 2015-12-22 15:06:32 +0100 |
commit | 7fce06b3f32ec564f129bf2a361d6ee37096e03b (patch) | |
tree | cab3dcd2e2debf115851f4d52fc2c681596bf288 | |
parent | 5e3710d74690c44c51c483729a210d1f8d109ce8 (diff) | |
download | nextcloud-server-7fce06b3f32ec564f129bf2a361d6ee37096e03b.tar.gz nextcloud-server-7fce06b3f32ec564f129bf2a361d6ee37096e03b.zip |
When microtime(true) returns a whole number, then the parsing fails.
This patch makes sure, that the value can always be parsed correctly.
-rw-r--r-- | lib/private/log/owncloud.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php index be69150d877..e455824a8dd 100644 --- a/lib/private/log/owncloud.php +++ b/lib/private/log/owncloud.php @@ -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); } |