r42574 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42573‎ | r42574 | r42575 >
Date:20:35, 25 October 2008
Author:greg
Status:old
Tags:
Comment:
Postgres timestamps can have decimals.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1715,9 +1715,9 @@
17161716 str_replace("+00:00", "UTC", $ts)));
17171717 } elseif (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/', $ts, $da)) {
17181718 # TS_ISO_8601
1719 - } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)[\+\- ](\d\d)$/',$ts,$da)) {
 1719+ } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',$ts,$da)) {
17201720 # TS_POSTGRES
1721 - } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/',$ts,$da)) {
 1721+ } elseif (preg_match('/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',$ts,$da)) {
17221722 # TS_POSTGRES
17231723 } else {
17241724 # Bogus value; fall back to the epoch...

Status & tagging log