From: Michael M Slusarz Date: Wed, 17 Dec 2008 06:36:37 +0000 (-0700) Subject: Request #5717 - Workaround obsolete UT dates. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=326eeeed8a9476e9839741c94c31a2c0b1711e72;p=horde.git Request #5717 - Workaround obsolete UT dates. --- diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index 03e7b3f24..a54c5ba2d 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -39,6 +39,7 @@ v5.0-cvs v4.3.3-cvs ---------- +[mms] Workaround obsolete 'UT' date format (Request #5717). [mms] Fix tracking folder changes when renaming (Bug #7772). [cjh] Suppress browser autocomplete when redirecting messages (Bug #7767). diff --git a/imp/lib/UI/Mailbox.php b/imp/lib/UI/Mailbox.php index 7df4052fc..91e3912e9 100644 --- a/imp/lib/UI/Mailbox.php +++ b/imp/lib/UI/Mailbox.php @@ -220,7 +220,15 @@ class IMP_UI_Mailbox try { $d = new DateTime($date); } catch (Exception $e) { - return _("Unknown Date"); + /* Bug #5717 - Check for UT vs. UTC. */ + if (substr(rtrim($date), -3) != ' UT') { + return _("Unknown Date"); + } + try { + $d = new DateTime($date . 'C'); + } catch (Exception $e) { + return _("Unknown Date"); + } } $udate = $d->format('U');