Created
November 26, 2014 10:51
-
-
Save wangtai/68945df51656edc13587 to your computer and use it in GitHub Desktop.
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
def datetime_to_seconds(time_in): | |
epoch = datetime.datetime(1970, 1, 1, tzinfo=pytz.utc) | |
delta = time_in - epoch | |
return delta.total_seconds() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment