Skip to content

Instantly share code, notes, and snippets.

@deeshank
Created October 31, 2018 18:21
Show Gist options
  • Save deeshank/5aa85a6c35b149545075c355acf4e628 to your computer and use it in GitHub Desktop.
Save deeshank/5aa85a6c35b149545075c355acf4e628 to your computer and use it in GitHub Desktop.
Python Current Timestamp w/ TimeZone
## Credits: https://julien.danjou.info/python-and-timezones/
import datetime
import pytz
utc_now = datetime.datetime.now(tz=pytz.utc)
print utcnow().isoformat()
# '2015-06-15T14:45:21.982600+00:00'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment