Serializing / Unserializing datetime

Brendan spam4bsimons at
Sat May 27 19:37:07 CEST 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

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

Brendan Simons

More information about the Python-list mailing list