[2.4.4] creating a datetime.datetime from an XML xs:dateTime

Martin martin at marcher.name
Sat Dec 27 15:08:23 EST 2008


Hi,

subject says it all. I'd like to create a python datetime.datetime
from an xs:string[1]

I know about time.strptime and could get to a datetime.datetime from
there, but that would be error prone like:

 * are there time zones?
 * how is the year represented
 * etc, yadda yadda

so I'd rather like to find some method (hopefully within the standard
lib) that had more peer review than only me :).

thanks
martin

[1] http://www.w3.org/TR/xmlschema-2/#dateTime
-- 
http://soup.alt.delete.co.at
http://www.xing.com/profile/Martin_Marcher
http://www.linkedin.com/in/martinmarcher

You are not free to read this message,
by doing so, you have violated my licence
and are required to urinate publicly. Thank you.

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the Python-list mailing list