Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   [2.4.4] creating a datetime.datetime from an XML xs:dateTime (http://www.velocityreviews.com/forums/t650275-2-4-4-creating-a-datetime-datetime-from-an-xml-xs-datetime.html)

Martin 12-27-2008 08:08 PM

[2.4.4] creating a datetime.datetime from an XML xs:dateTime
 
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


All times are GMT. The time now is 06:42 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.