- Date in the mail should be in RFC2822 date time format
- RFC2822 is locale independant format
- perldoc POSIX: “the specifiers “aAbBcpZ” change according to the
locale settings of the user” - we have simple and I belive fast RFC2822 formatter in 3.7 branch
which could be backported to 3.6 with minimal changes.
An exmaple:
perl -MPOSIX -e 'print strftime(“%a, %d %b %Y %H:%M:%S %z”,
localtime()), “\n”;’
Чтв, 07 Сен 2006 05:54:53 +0400
^^^ Russian localeOn 9/6/06, jesse@bestpractical.com jesse@bestpractical.com wrote:
Author: jesse
Date: Wed Sep 6 15:07:22 2006
New Revision: 5872Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.inLog:
r27203@pinglin: jesse | 2006-09-06 15:07:04 -0400
RT-Ticket: 7848
RT-Status: resolved
RT-Update: correspond
- POSIX::strftime on Solaris isn’t robust enough to deal with our Date: header generation.
Switched to Date::Format::strftime instead. - ADDED DEPENDENCY: Date::Format
Fix thanks to Tim BishopModified: rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm
— rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Action/SendEmail.pm Wed Sep 6 15:07:22 2006
@@ -56,7 +56,7 @@use RT::EmailParser;
use Mail::Address;
-use POSIX qw(strftime);
+use Date::Format qw(strftime);=head1 NAME
@@ -252,8 +252,9 @@
}unless ($MIMEObj->head->get('Date')) {
$self->SetHeader('Date',
strftime('%a, %d %b %Y %H:%M:%S %z', localtime()));
# We coerce localtime into an array since strftime has a flawed prototype that only accepts
# a list
$self->SetHeader('Date', strftime('%a, %d %b %Y %H:%M:%S %z', @{[localtime()]}));
}
my $SendmailArguments = $RT::SendmailArguments;
Modified: rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in
— rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in (original)
+++ rt/branches/3.6-RELEASE/sbin/rt-test-dependencies.in Wed Sep 6 15:07:22 2006
@@ -159,6 +159,7 @@
DBI 1.37
Test::Inline
Class::ReturnValue 0.40
+Date::Format
DBIx::SearchBuilder 1.39
Text::Template
File::Spec 0.8
Rt-commit mailing list
Rt-commit@lists.bestpractical.com
rt-commit Info Page
Best regards, Ruslan.