On Wed, 31 Jan 2007, Stefan Reinauer wrote:
> commit-email.pl does not add a date header to the mails
> it sends out. This looks ugly in some mail clients, such
> as Mozilla Thunderbird, because the mails are shown to
> be written on 1970-01-01.
--- commit-email.pl.in.orig 2006-04-20 01:08:55.000000000 +0200
+++ commit-email.pl.in 2007-01-30 16:11:30.000000000 +0100
@@ -38,6 +38,7 @@
use strict;
use Carp;
+use Date::Format;
I don't have this module installed by default on my FC6 system. Is
there any reason not to use the strftime() routine from the POSIX
module (e.g. is it available on Windows), as suggested by 'man
perlfunc'?
my ($sendmail, $smtp_server);
######################################################################
@@ -537,6 +538,9 @@
}
my @head;
+ my @lt=localtime();
^ ^
Need additional whitespace.
+ my $header_date = strftime("%a, %e %b %Y %X %z", @lt);
+ push(@head, "Date: $header_date\n");
push(@head, "To: $to\n");
push(@head, "From: $mail_from\n");
push(@head, "Subject: $subject\n");
- application/pgp-signature attachment: stored
Received on Sat Feb 10 02:19:02 2007