Created
January 31, 2015 15:04
-
-
Save greggy/1a65c83ed2828e24ac0e to your computer and use it in GitHub Desktop.
Get timestamp with TZ
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
########################################### | |
## Get timestamp with TZ | |
########################################### | |
from datetime import datetime | |
import time, pytz | |
mytz = pytz.timezone('Europe/Moscow') | |
print( int(time.mktime(mytz.localize(datetime.now()).timetuple())) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment