Package: swaks
Version: 20100211.0-4
Tags: patch
The timezone field of RFC 822 date format is [+-]HHMM, whereas swaks
calculates it as hundredths-of-an-hour. So it is wrong any time the MM
field is nonzero. For example:
Timezone RFC822 swaks
-----------------------------------
Canada/Newfoundland -0230 -0250
Asia/Tehran +0330 +0350
Asia/Kathmandu +0545 +0575
Australia/Eucla +0845 +0875
Peter
--- swaks
+++ swaks
@@ -1946,7 +1946,8 @@
@l = gmtime($et);
} else {
my @g = gmtime($et);
- $o = (timelocal(@l) - timelocal(@g))/36;
+ $o = (timelocal(@l) - timelocal(@g))/60;
+ $o = int($o / 60)*100 + ($o%60)*($o > 0 ? 1 : -1);
}
$G::date_string = sprintf("%s, %02d %s %d %02d:%02d:%02d %+05d",
(qw(Sun Mon Tue Wed Thu Fri Sat))[$l[6]],
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]