Created
September 18, 2015 14:23
-
-
Save baude/8770298d5a39078f10cb to your computer and use it in GitHub Desktop.
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
| import datetime | |
| epoch = datetime.datetime.utcfromtimestamp(0) | |
| remote_pattern = '%Y-%m-%d %H:%M:%S %Z' | |
| remote_ts = '2015-09-18 12:36:10 GMT' | |
| remote_dt = datetime.datetime.strptime(remote_ts, remote_pattern) | |
| foo = (remote_dt - epoch).total_seconds() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment