[Zope-Coders] Re: [ZC] 411/ 2 Accept "DateTime.rfc822 is not rfc822 compliant"

Lennart Regebro lennart@torped.se
Mon, 14 Oct 2002 19:09:26 +0200


I have in lennart-collector_411_fix-branch checked in a fix that returns the
correct offsets if the DateTime objects timezone is either the local
standard timezone or the local daylight saving timezone offset.

If it isn't in any local timezone, -0000 (unknown timzone offset) is
returned. This is compliant and per specification. The reason for this is
that there seem to be no standard way in Unix to get the timezone offset for
a specific timezone, and it is my sincere religious conviction that it is A
Bad Thing to add such info to Zope.

I'll make some tests for rfc822() tomorrow and then merge them into HEAD and
Zope-2_6-branch. Is there to be a 2.5.2 release too? In that case I'll merge
it into the 2_5 branch also.


----- Original Message -----
From: "Collector: Zope Bugs, Features, and Patches ..."
<zope-coders@zope.org>
To: "Nigel Hathaway" <nigel@bprj.co.uk>; "regebro" <lennart@torped.se>;
"klm" <klm@zope.com>; "Brian" <brian@zope.com>; "chrism" <chrism@zope.com>;
"Caseman" <casey@zope.com>; "_Accepted_ recipient"
<zope-collector-monitor@zope.org>
Sent: Monday, October 14, 2002 5:31 PM
Subject: [ZC] 411/ 2 Accept "DateTime.rfc822 is not rfc822 compliant"


> Issue #411 Update (Accept) "DateTime.rfc822 is not rfc822 compliant"
>  Status Accepted, Zope/bug medium
> To followup, visit:
>   http://collector.zope.org/Zope/411
>
> ==============================================================
> = Accept - Entry #2 by regebro on Oct 14, 2002 11:31 am
>
>  Status: Pending => Accepted
>
>  Supporters added: regebro
>
> You are correct. MailHost now adds a Date header if it is missing, so
dtml-sendmail will now include the mail. Fixing DateTime.rfc822() is more
complex though, so I haven't fixed that yet.
>
> One ugly possibility is to set the zone to -0000, which will make it
compliant, but loose the time zone information...
> ________________________________________
> = Request - Entry #1 by Anonymous User on May 31, 2002 12:04 pm
>
> It produces (for example): Fri, 31 May 2002 17:00:05 GMT+1
> Whereas it should be: Fri, 31 May 2002 17:00:05 +0100
> In the time zone you can have letters (e.g. GMT) or numbers (e.g. +0100)
but not both, and the numbers must be in the sign-and-4-digit format.
> The numbers-only format is preferable, as that what most e-mail messages
have.
> I notice the <dtml-sendmail> example conveniently misses out the date.
>
> ==============================================================
>
>