summaryrefslogtreecommitdiff
path: root/awm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-03-18 09:53:53 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-03-18 09:53:53 +0000
commit814aee5e3719d1932c0b761922e184e146a3f8b8 (patch)
treee2f50024fa4679af588bef56b1826d0a0dfdca94 /awm
parent746bdb56f289097c199c483025cc5427febae81e (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-xawm6
1 files 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;
};