Last active
June 13, 2021 18:42
-
-
Save rgpower/3a9afcb0df4fd140dab8a72efeff43e7 to your computer and use it in GitHub Desktop.
parse iso8601 '2019-11-26T18:26:19Z' format string in python
This file contains 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
""" | |
parse iso8601 '2019-11-26T18:26:19Z' format string in python | |
""" | |
def from_iso8601(datetime_iso: str): | |
return datetime.datetime.strptime(datetime_iso, "%Y-%m-%dT%H:%M:%S%z") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment