Bug 369672. Feed preview doesn't show dates when the timezone is specified as UTC rather than GMT. Patch by Michael Ventnor <ventnor.bugzilla@yahoo.com.au>. r=sayrer

This commit is contained in:
sayrer@gmail.com 2007-04-16 23:17:42 -07:00
parent cbfee6fb22
commit 923cbd1585
2 changed files with 13 additions and 1 deletions

View File

@ -770,7 +770,7 @@ function trimString(s) {
const RFC822_RE = "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun)([a-z]+)?,? *)?\\d\\d?"
+ " +(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)([a-z]+)?"
+ " +\\d\\d(\\d\\d)? +\\d?\\d:\\d\\d(:\\d\\d)?"
+ " +([+-]?\\d\\d\\d\\d|GMT|UT|(E|C|M|P)(ST|DT)|[A-IK-Z])$";
+ " +([+-]?\\d\\d\\d\\d|GMT|UT[C]?|(E|C|M|P)(ST|DT)|[A-IK-Z])$";
/**
* XXX -- need to decide what this should return.

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Description: Test whether new regexp handles irregular dates.
Expect: feed.updated == 'Monday, 16 April 2007 03:12:45 UTC'
-->
<rss version="2.0" >
<channel>
<pubDate>Monday, 16 April 2007 03:12:45 UTC</pubDate>
</channel>
</rss>