From: Greg Sabino Mullane Date: Sat, 25 Oct 2008 20:35:14 +0000 (+0000) Subject: Postgres timestamps can have decimals. X-Git-Tag: 1.31.0-rc.0~44590 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=547cb9858ca6886dedb42292311d8a5abd10199f;p=lhc%2Fweb%2Fwiklou.git Postgres timestamps can have decimals. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6a5d1c5fd1..b61368a56d 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1715,9 +1715,9 @@ function wfTimestamp($outputtype=TS_UNIX,$ts=0) { 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)) { # TS_ISO_8601 - } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)[\+\- ](\d\d)$/',$ts,$da)) { + } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',$ts,$da)) { # TS_POSTGRES - } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/',$ts,$da)) { + } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',$ts,$da)) { # TS_POSTGRES } else { # Bogus value; fall back to the epoch...