Skip to content

Instantly share code, notes, and snippets.

@greggy
Created January 31, 2015 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greggy/1a65c83ed2828e24ac0e to your computer and use it in GitHub Desktop.
Save greggy/1a65c83ed2828e24ac0e to your computer and use it in GitHub Desktop.
Get timestamp with TZ
###########################################
## 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