[Zope] DateTime strftime problem

Ron Bickers rbickers-list-zope2 at logicetc.com
Mon Nov 7 12:20:32 EST 2005


On Mon November 7 2005 12:15 pm, Ron Bickers wrote:

>   dt = DateTime('2005/04/03 02:01 GMT').toZone('GMT-4')
>   '%s/%s/%s %s:%s %s' % (dt.year(), dt.month(), dt.day(),
>                          dt.hour(), dt.minute, dt.timezone())

>   '%s/%s/%s %s:%s:%s %s' % (dt.parts())

Uh... you'll probably need to change the format string to suit your needs of 
leading zeros and such, but you get the idea.

-- 
Ron


More information about the Zope mailing list