Andreas Poisel wrote:
> Thanks for keeping Webware alive, I'm actively using it in a couple of
> projects and I'd still choose Webware for a specific type of project.
> 
> But I think there is a problem with Funcs.dateForEmail() in Webware
> 1.0.1:
> 
>     >>> import locale
>     >>> locale.setlocale(locale.LC_ALL, "de_DE.ISO-8859-1")
>     'de_DE.ISO-8859-1'
>     >>> from Funcs import dateForEmail
>     >>> dateForEmail()
>     'Di, 03 Mär 2009 15:53:45 +0100'
> 
> According to RFC 5322, English abbreviations have to be used for date
> and time specifications
> (http://tools.ietf.org/html/rfc5322#section-3.3).  Some MTAs complain
> about umlauts within e-mail headers.

Good catch! Interestingly, on my PC with German local it even produced a 
different abbreviation (Mrz) for March.

> I'm sure there is a way to get the names without having to list them.

I found that Python >= 2.4 has this function already in the std lib as 
email.utils.formatdate. There it is implemented pretty similar to what 
you're doing, and I think that's the right way to be sure that we comply 
with the RFC no matter how time.strftime() is implemented.

Since Webware 1.0.x aims at compatibility with Py >= 2.0 and the 
function is used internally, I have fixed that in r7822 by 
reimplementing dateForEmail similar to the function in the std lib.

Let me know if you have any other problems or suggestions.

-- Christoph

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to