strftime is actually available in both C and Perl (it's part of the
POSIX module, and all IEEE Std 1003.1-1990 compliant languages[1] have
to support it).  I'd meant to send a note in response to Robert's
message, but I wanted to actually have the actual strftime code worked
out and tested; other things (work) prevented me from doing so.

Ed

[1] POSIX was drafted as a standard for C programming languages.
However, a number of C-descended languages have opted to retain POSIX
compliance (such as Perl), and I've heard some people say that a few
languages have opted to gain POSIX compliance, though they weren't C.  I
wouldn't know what those languages are, however.

On Sun, 2 Oct 2005, Gerald Richter wrote:

> Hi,
>
> I have made a similar version of your patch, that moves the date
> generation into C code, because a similar routine is already there. It
> also handles the timezone.
>
> It's in the CVS and will be in 2.0.1
>
> Gerald
>
>
> ---------------------------------------------------------------------------
> Besuchen Sie uns auf der Systems 2005 in München, Halle B2, Stand 704
> ---------------------------------------------------------------------------
> Gerald Richter            ecos electronic communication services gmbh
> IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
>
> Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
> E-Mail:     [EMAIL PROTECTED]          Voice:   +49 6133 939-122
> WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
> ---------------------------------------------------------------------------
> ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
> ---------------------------------------------------------------------------
>
>> -----Original Message-----
>> From: RobertCZ [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, September 15, 2005 10:45 AM
>> To: embperl@perl.apache.org
>> Subject: Date patch for Embperl::Mail
>>
>> Hi,
>>
>>   as I reported, I have problems with mails sent from
>> Embperl::Mail and Thunderbird/Netscape - mails are dated
>> 1.1.1970.  I don't know what deep cause of the problem is
>> butI fixed it simply by adding Date: header manually. I guess
>> more people will have similar problem so I propose patch
>> Embperl::Mail with something like (I use Date::Calc because I
>> need it anyway but as not to add addtional dependency):
>>
>> ... [ around line 130 ]...
>>
>> ($Second, $Minute, $Hour, $Day, $Month, $Year, $DoW) =
>> localtime(time) ;
>>
>> @month = qw( January February March April May June July
>> August September October November December );
>>
>> @dow   = qw( Monday Tuesday Wednesday Thursday Friday
>> Saturday Sunday );
>>
>> $MonthStr = substr($month[ $Month ], 0, 3);
>>
>> $DoWStr = substr($dow[ $DoW ], 0, 3);
>>
>> $Year += 1900;
>>
>> $DateHeader = qq(Date: $DoWStr, $Day $MonthStr $Year
>> $Hour:$Minute:$Second);
>>
>> 'Date' =~ join(':',@$headers) or push @headers, $DateHeader;
>>
>>
>> My Thunderbird shows Date header as
>>
>> Date: Thu, 15 Sep 2005 08:41:06 +0200 (CEST)
>>
>>
>> I don't know what to do with the time zone so I just ignore
>> it and hope for the best ;-)
>>
>> Could you comment and if it's OK - Gerald perhaps add it to
>> the next release? It's bother to add it to every single mail
>> form manually...
>>
>> - Robert

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

Reply via email to