diff options
author | alecpl <alec@alec.pl> | 2009-02-11 13:38:38 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-02-11 13:38:38 +0000 |
commit | 33875df40b31d571597d92e9f1bd100fba10d10b (patch) | |
tree | 8ac673bfdface0c68bf4c58a37b4a094bc618bcb | |
parent | 5faac054c30d38459e157ebc90e8e7b4b3c292b2 (diff) |
- Support non-standard "GMT-XXXX" literal in date header (#1485729)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/include/main.inc | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -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/program/include/main.inc b/program/include/main.inc index 5ee652269..5cc0fb214 100644 --- a/program/include/main.inc +++ b/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)) |