summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-02-11 13:38:38 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-02-11 13:38:38 +0000
commit0447279f7094657e3b1edc08078e3e3c3703eafe (patch)
treeda3d2e56fa7b71be525d85102f97e8b0d10ad25a
parent2d2bfc3abbd41ddafbeb8c741270dfb32547b2e5 (diff)
- Support non-standard "GMT-XXXX" literal in date header (#1485729)
git-svn-id: https://svn.roundcube.net/trunk@2288 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/program/include/main.inc2
2 files changed, 3 insertions, 0 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 7e57645f6..9b6808f10 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -4,6 +4,7 @@ CHANGELOG RoundCube Webmail
2009/02/10 (alec)
----------
- Use default_charset for messages without specified charset (#1485661, #1484961)
+- Support non-standard "GMT-XXXX" literal in date header (#1485729)
2009/02/08 (thomasb)
----------
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 5ee652269..5cc0fb214 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -713,6 +713,8 @@ function format_date($date, $format=NULL)
$ts = $date;
else if (!empty($date))
{
+ // support non-standard "GMTXXXX" literal
+ $date = preg_replace('/GMT\s*([+-][0-9]+)/', '\\1', $date);
// if date parsing fails, we have a date in non-rfc format.
// remove token from the end and try again
while ((($ts = @strtotime($date))===false) || ($ts < 0))