From 814aee5e3719d1932c0b761922e184e146a3f8b8 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 18 Mar 2013 09:53:53 +0000 Subject: 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 --- awm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awm b/awm index 8166509..f83555f 100755 --- a/awm +++ b/awm @@ -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; }; -- cgit v1.2.3