diff options
author | steve <steve@FreeBSD.org> | 2001-12-03 02:28:29 +0800 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 2001-12-03 02:28:29 +0800 |
commit | 837d938a4dba6de0e5f6af2598761c711a094f90 (patch) | |
tree | 9d2d1e28ca10e7ce50dcba993ebeaeaa2814ce2e /mail | |
parent | c51da22410cb4f6a1b4a16bf564a7896a1bf4920 (diff) | |
download | freebsd-ports-gnome-837d938a4dba6de0e5f6af2598761c711a094f90.tar.gz freebsd-ports-gnome-837d938a4dba6de0e5f6af2598761c711a094f90.tar.zst freebsd-ports-gnome-837d938a4dba6de0e5f6af2598761c711a094f90.zip |
Fix broken timezone specification in the generated Date: header.
PR: 32372
Submitted by: David Wolfskill <dhw@whistle.com>
Diffstat (limited to 'mail')
-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; + + }; |