Serializing / Unserializing datetime

Brendan spam4bsimons at yahoo.ca
Sat May 27 13:37:07 EDT 2006


Hi All

I can't find the "Python Way" of writing a datetime instance to a
string so that it can be easily parsed back again.  time.strptime is
apparantly not supported on some platforms, and time.time <==>
datetime.utcfromtimestamp will cause problems come 2038.  Unfortunately
there don't seem to be "fromstring" equivalents for datetime.ctime or
datetime.isoformat.

Ideally the serialized datetime should be human readable, and
potentially parseable from other languages.  Any suggestions?

  Brendan
--
Brendan Simons




More information about the Python-list mailing list