I wonder if we can replace this function with a call to isoformat ?

    http://docs.python.org/2/library/datetime.html#datetime.datetime.isoformat