summaryrefslogtreecommitdiffstats
path: root/mail/p5-Mail-Bulkmail
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>2001-12-02 18:28:29 +0000
committersteve <steve@FreeBSD.org>2001-12-02 18:28:29 +0000
commit837d938a4dba6de0e5f6af2598761c711a094f90 (patch)
tree9d2d1e28ca10e7ce50dcba993ebeaeaa2814ce2e /mail/p5-Mail-Bulkmail
parentc51da22410cb4f6a1b4a16bf564a7896a1bf4920 (diff)
downloadFreeBSD-ports-837d938a4dba6de0e5f6af2598761c711a094f90.zip
FreeBSD-ports-837d938a4dba6de0e5f6af2598761c711a094f90.tar.gz
Fix broken timezone specification in the generated Date: header.
PR: 32372 Submitted by: David Wolfskill <dhw@whistle.com>
Diffstat (limited to 'mail/p5-Mail-Bulkmail')
-rw-r--r--mail/p5-Mail-Bulkmail/files/patch-Bulkmail.pm40
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 0000000..0153d0b
--- /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;
+
+ };
OpenPOWER on IntegriCloud