[Zope] DateTime.strftime problem

Ron Bickers rbickers-list-zope2 at logicetc.com
Tue Feb 1 18:16:43 EST 2005


On Tuesday 01 February 2005 12:44 pm, Dieter Maurer wrote:

> This means: everything is correct with the exception of the timezone
> info.

Not in 2.7.4; the time returned by strftime is always in the local timezone, 
so %Z remains correct, but there's no way to get the hour of another 
timezone from it.

> There are two approaches:
>
>   * Do not use "time.strftime"

That's the approach I took.

>   * Code the "%Z" appropriately before the format is passed
>     on to "time.strftime" and after the call replace the code with the
>     timezone of the "DateTime".

That would work in Zope prior to 2.7.4, but not anymore.

Thanks for your time.

-- 
Ron


More information about the Zope mailing list