Python datetime to XML Schema timestamp format
>>> datetime.datetime.now(pytz.utc).isoformat()
'2012-02-17T11:58:44.789024+00:00'
>>> datetime.datetime.now(pytz.timezone('Europe/Paris')).isoformat()
'2012-02-17T13:00:10.885743+01:00'
apply your own time zone if needed.