Subject: | Mail::Sendmail::time_to_date |
Date: | Tue, 19 Nov 2019 11:35:49 +0000 |
To: | "bug-Mail-Sendmail [...] rt.cpan.org" <bug-Mail-Sendmail [...] rt.cpan.org> |
From: | Jerzy Baran <jb [...] softsystem.pl> |
Mail::Sendmail::time_to_date returns invalid value (current time instead of localtime(0)) when called with argument 0, see below:
DB<19> p scalar(localtime(0))
Wed Dec 31 19:00:00 1969
DB<20> p Mail::Sendmail::time_to_date(0)
Tue, 19 Nov 2019 06:20 -0500
DB<21>
Sendmail.pm VERSION 0.80:
137: sub time_to_date {
138: # convert a time() value to a date-time string according to RFC 822
139:
140: my $time = $_[0] || time(); # default to now if no argument <--- time now is also with argument 0, was it intentional ?
Regards,
Jerzy Baran