[Zope] DateTime and ISO-dates

Lennart Staflin lennarts@tosca.infotek.no
12 Apr 2000 14:12:35 +0200


Hi all,

I have some problems with DateTime in Zope. I generally want dates in
the form 'YYYY-MM-DD'. But I can't figure out an easy way to get this
with DateTime objects. There is a ISO method that produces both date
and time: 'YYYY-MM-DD HH:MM:SS'. But nothing to get only the date.

Perhaps one could wish for some addtions to the DateTime class. Some
possibilities are, in order of preference:

1. Configurable default data format.
2. An ISODate method.
3. strftime method that uses localtime and not gmtime.

Any other suggestions how to do this?

-- 
Lennart Staflin  <lennarts@infotek.no>  /*/  STEP Infotek AS,
http://www.infotek.no/  Gjerdrums vei 12, N-0486 Oslo, Norway