diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-03-18 09:53:53 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-03-18 09:53:53 +0000 |
commit | 814aee5e3719d1932c0b761922e184e146a3f8b8 (patch) | |
tree | e2f50024fa4679af588bef56b1826d0a0dfdca94 /awm | |
parent | 746bdb56f289097c199c483025cc5427febae81e (diff) |
parse timestamps with UTC as default, to match our gmtime() call when sorting into folders
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@594 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'awm')
-rwxr-xr-x | awm | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -141,11 +141,11 @@ sub gettime($) { my $received = $header->get('Received', 0); my ($date, $time); ($date) = $received =~ /;([^;]+)$/ if defined $received; - $time = parsedate($date) if defined $date; + $time = parsedate($date, GMT => 1) if defined $date; unless (defined $time) { $QUIET or warn ("$PROGRAM_NAME: Falling back to date header in $file\n"); $date = $header->get('Date'); - $time = parsedate($date) if defined $date; + $time = parsedate($date, GMT => 1) if defined $date; warn ("$PROGRAM_NAME: Cannot get time for mail $file\n"), return undef unless defined $time; @@ -208,7 +208,7 @@ $PRINTVERSION and print "$PROGRAM_NAME version $VERSION", exit(0); if ($ARCHIVE_OLDER =~ /[^0-9]/) { - $ARCHIVE_OLDER = parsedate($ARCHIVE_OLDER, PREFER_PAST => 1, WHOLE => 1); + $ARCHIVE_OLDER = parsedate($ARCHIVE_OLDER, PREFER_PAST => 1, WHOLE => 1, GMT => 1); die ("Cannot parse timestamp\n") unless defined $ARCHIVE_OLDER; }; |