diff options
author | Steve Price <steve@FreeBSD.org> | 2001-12-02 18:28:29 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 2001-12-02 18:28:29 +0000 |
commit | 2c55da9be4f00967641adca8dfa47d5110a258a1 (patch) | |
tree | a81e4ad1159f5549b886e06023e43bc914a62932 /mail/p5-Mail-Bulkmail | |
parent | Update to version 1.20. (diff) |
Fix broken timezone specification in the generated Date: header.
PR: 32372
Submitted by: David Wolfskill <dhw@whistle.com>
Notes
Notes:
svn path=/head/; revision=50876
Diffstat (limited to 'mail/p5-Mail-Bulkmail')
-rw-r--r-- | mail/p5-Mail-Bulkmail/files/patch-Bulkmail.pm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mail/p5-Mail-Bulkmail/files/patch-Bulkmail.pm b/mail/p5-Mail-Bulkmail/files/patch-Bulkmail.pm new file mode 100644 index 000000000000..0153d0bd8069 --- /dev/null +++ b/mail/p5-Mail-Bulkmail/files/patch-Bulkmail.pm @@ -0,0 +1,40 @@ +--- Bulkmail.pm.orig Fri Sep 7 12:28:16 2001 ++++ Bulkmail.pm Wed Nov 28 07:27:50 2001 +@@ -704,16 +704,31 @@ + + my $self = shift or undef; + +- my ($min, $hour, $isdst) = (localtime(time))[1,2,-1]; +- my ($gmin, $ghour, $gsdst) = (gmtime(time))[1,2, -1]; ++ my $now = time; ++ my ($min, $hour, $isdst) = (localtime($now))[1,2,-1]; ++ my ($gmin, $ghour, $gsdst) = (gmtime($now))[1,2, -1]; + +- my $diffhour = $hour - $ghour; +- $diffhour = 12 - $diffhour if $diffhour > 12; +- $diffhour = 12 + $diffhour if $diffhour < -12; ++ my $diffmin = ($hour - $ghour) * 60 + ($min - $gmin); ++ my $diffhour = int($diffmin / 60); ++ $diffmin -= $diffhour * 60; ++ if ($diffhour > 12) { ++ $diffhour -= 24; ++ if ($diffmin) { ++ $diffhour += 1; ++ $diffmin -= 60; ++ } ++ } elsif ($diffhour < -12) { ++ $diffhour += 24; ++ if ($diffmin) { ++ $diffhour -= 1; ++ $diffmin += 60; ++ } ++ } ++ $diffmin = abs($diffmin); + +- ($diffhour = sprintf("%03d", $hour - $ghour)) =~ s/^0/\+/; ++ ($diffhour = sprintf("%03d%02d", $diffhour, $diffmin)) =~ s/^0/\+/; + +- return $diffhour . sprintf("%02d", $min - $gmin); ++ return $diffhour; + + }; |