Add utility for getting the timestamp in ISO 8601 format.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-23 07:03:55 +00:00
parent 55ca5487bb
commit de9eb4ca77
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 4 additions and 0 deletions

View File

@ -318,6 +318,10 @@ def _next_year():
next_year = str(int(year)+1)
return '-'.join((next_year, month, day))
def _now():
"""Get a timestamp for right now, formatted according to ISO 8601."""
return datetime.isoformat(datetime.now())
def _threaded_copy_data(instream, outstream):
"""Copy data from one stream to another in a separate thread.