Created
June 19, 2018 09:00
-
-
Save MJ111/f46670a0e50dbd219511db6d9d308ddf to your computer and use it in GitHub Desktop.
get_utc_iso_format.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_iso_format(): | |
""" | |
this returns utc iso8601 string. for example: '2018-06-19T08:51:56+00:00' | |
""" | |
import datetime | |
return datetime.datetime.now(tz=datetime.timezone.utc).replace(microsecond=0).isoformat() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment