+
+SKIP: {
+ require_mods('Date::Parse', 1);
+ my $now = time;
+ if (join("\0", gmtime($now)) ne join("\0", localtime($now))) {
+ skip('needs TZ=UTC to test zone-less parsing', 1);
+ }
+ is_datestamp('Sat, 27 Sep 1997 10:02:32', [875354552, '+0000']);
+}
+
+# obsolete formats described in RFC2822
+for (qw(UT GMT Z)) {
+ is_datestamp('Fri, 02 Oct 1993 00:00:00 '.$_, [ 749520000, '+0000']);
+}
+is_datestamp('Fri, 02 Oct 1993 00:00:00 EDT', [ 749534400, '-0400']);
+
+# fallback to Received: header if Date: is out-of-range:
+is_datestamp('Fri, 1 Jan 1904 10:12:31 +0100',
+ PublicInbox::MsgTime::str2date_zone($received_date));
+is_datestamp('Fri, 9 Mar 71685 18:45:56 +0000', # Y10K is not my problem :P
+ PublicInbox::MsgTime::str2date_zone($received_date));
+