From: "John W. Krahn" <[EMAIL PROTECTED]>
> Or, you could do it the "correct" way.  :-)
> 
> use POSIX 'strftime';
> 
> my $date = strftime '%a, %d %b %Y %H:%M:%S %z', localtime;
> $smtp->datasend( "Date: $date\n" );

I'm not sure this is the correct way.
This prints
        Sun, 05 Jan 2003 18:42:54 Central Europe Standard Time
on my computer (Win2k, ActivePerl 5.5.1 build 631 as well as 
ActivePerl 5.8.0 build 804).
Which is NOT understood properly by my mailer (Pegasus Mail 4.02a).

My way prints
        Sun, 5 Jan 2003 18:47:11 +0100
which is understood.

According to the RFC 822 : http://www.faqs.org/rfcs/rfc822.html
        (STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES)

        zone        =  "UT"  / "GMT"                ; Universal Time
                                                 ; North American : 
UT
                 /  "EST" / "EDT"                ;  Eastern:  - 5/ - 
4
                 /  "CST" / "CDT"                ;  Central:  - 6/ - 
5
                 /  "MST" / "MDT"                ;  Mountain: - 7/ - 
6
                 /  "PST" / "PDT"                ;  Pacific:  - 8/ - 
7
                 /  1ALPHA                       ; Military: Z = UT;
                                                 ;  A:-1; (J not 
used)
                                                 ;  M:-12; N:+1; 
Y:+12
                 / ( ("+" / "-") 4DIGIT )        ; Local differential
                                                 ;  hours+min. (HHMM)

And according to RFC 2822 : http://www.faqs.org/rfcs/rfc2822.html
        (Internet Message Format) 

        zone         =       (( "+" / "-" ) 4DIGIT) ; obs-zone

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to