[quills-dev] [Collective-checkins] r49995 - quills.remoteblogging/trunk/quills/remoteblogging/browser
Tom Lazar lists at tomster.orgMon Sep 24 12:29:20 UTC 2007
- Previous message: [quills-dev] [Collective-checkins] r49995 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Next message: [quills-dev] [Collective-checkins] r49995 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thanks raphael, i just wanted to avoid using this sort of stuff. but that strptime will surely come in handy, i've gotta remember that one! @tim2p: perhaps this approach will help us push DateTime out of quills.app? cheers, tom On 24.09.2007, at 10:50, Raphael Ritz wrote: > quills-dev at lists.etria.com wrote: >> Author: tomster >> Date: Sun Sep 23 22:19:20 2007 >> New Revision: 49995 >> > > [..] > >> >> i couldn't find any documentation on how to convert >> xmlrpc.DateTime into DateTime.DateTime > > FWIW > > Python 2.4.4 (#2, Apr 12 2007, 21:03:11) > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from xmlrpclib import DateTime as xdt >>>> from time import strptime >>>> from datetime import datetime >>>> xmlrpcdt = xdt() >>>> xmlrpcdt > <DateTime '20070924T10:44:06' at -482578f4> >>>> str(xmlrpcdt) > '20070924T10:44:06' >>>> datetimedt = datetime(*strptime(str(xmlrpcdt),"%Y%m%dT%H:%M:%S") >>>> [0:6]) >>>> datetimedt > datetime.datetime(2007, 9, 24, 10, 44, 6) >>>> str(datetimedt) > '2007-09-24 10:44:06' >>>> > > > Getting from Python's datetime objects to Zope's DateTime > is left as an easy exercise ;-) > > Raphael > > _______________________________________________ > quills-dev mailing list > quills-dev at lists.etria.com > http://lists.etria.com/cgi-bin/mailman/listinfo/quills-dev >
- Previous message: [quills-dev] [Collective-checkins] r49995 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Next message: [quills-dev] [Collective-checkins] r49995 - quills.remoteblogging/trunk/quills/remoteblogging/browser
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the quills-dev mailing list