Merge pull request #481 from andrewgaul/use-gmt-for-rfc822-date

Use GMT for RFC 822 dates
This commit is contained in:
Adrian Cole 2012-03-20 00:41:32 -07:00
commit ec8b428220
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ public class SimpleDateFormatDateService implements DateService {
private static final SimpleDateFormat iso8601SimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US);
// @GuardedBy("this")
private static final SimpleDateFormat rfc822SimpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
private static final SimpleDateFormat rfc822SimpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
// @GuardedBy("this")
private static final SimpleDateFormat cSimpleDateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.US);

View File

@ -42,7 +42,7 @@ import org.joda.time.format.DateTimeFormatter;
public class JodaDateService implements DateService {
private static final DateTimeFormatter rfc822DateFormatter = DateTimeFormat.forPattern(
"EEE, dd MMM yyyy HH:mm:ss z").withLocale(Locale.US).withZone(DateTimeZone.forID("GMT"));
"EEE, dd MMM yyyy HH:mm:ss 'GMT'").withLocale(Locale.US).withZone(DateTimeZone.forID("GMT"));
private static final DateTimeFormatter cDateFormatter = DateTimeFormat
.forPattern("EEE MMM dd HH:mm:ss Z yyyy").withLocale(Locale.US).withZone(DateTimeZone.forID("GMT"));