[Zope] DateTime strftime problem
Jürgen Herrmann
Juergen.Herrmann at XLhost.de
Tue Nov 8 09:12:33 EST 2005
[ Andreas Jung wrote:]
>
>
> --On 7. November 2005 15:36:26 +0100 Andreas Jung <lists at andreas-jung.com>
> wrote:
>
>>
>>
>> --On 7. November 2005 15:22:56 +0100 Jürgen Herrmann
>> <Juergen.Herrmann at XLhost.de> wrote:
>>
>>> 2. if this works as expected, why not make DateTime a wrapper around
>>> python datetime objects? is DateTime optimized for storage in the
>>> zodb (maybe a separate question to the zodb-dev list)?
>>> what was the intention to create DateTime anyway, if there's a
>>> python pendant already?
>>>
>>
>> This idea had been discussed already for Python 2.4 or Python 2.5
>
> I mean: Zope 2.4 or Zope 2.5, not Python ....
>
> -aj
i looked at the source of DateTime::strftime(), surpirse, surprise :)
strftime uses python's datetime class and it's strftime method!
but no care is taken at this time for timezone information, so i
decided to code a tzinfo subclass for datetime that can represent
fixed offset from gmt (no dst) and hand one such instance to
datetime.fromtimestamp(). seems like this code is working correctly now.
i'll run it against some tests tomorrow and report back on the results.
regards, juergen herrmann
_______________________________________________________________________
>> XLhost.de - eXperts in Linux hosting <<
Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg
Fon: +49 (0)700 XLHOSTDE [0700 95467833]
Fax: +49 (0)721 151 463027
WEB: http://www.XLhost.de
More information about the Zope
mailing list