From 8e046be4a5ca219d03304a92258b380d046ede96 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 31 Oct 2008 15:53:15 +0000 Subject: [PATCH] ISO 8601 timestamps can have decimal seconds --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b61368a56d..ead550fa6c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1713,7 +1713,7 @@ function wfTimestamp($outputtype=TS_UNIX,$ts=0) { # TS_ORACLE $uts = strtotime(preg_replace('/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3", str_replace("+00:00", "UTC", $ts))); - } elseif (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/', $ts, $da)) { + } elseif (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z$/', $ts, $da)) { # TS_ISO_8601 } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',$ts,$da)) { # TS_POSTGRES -- 2.20.1