Created
June 15, 2012 06:37
-
-
Save martin-lukac/2935042 to your computer and use it in GitHub Desktop.
India Timezone pytz possible issue
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
#!/usr/bin/python | |
import pytz | |
from datetime import datetime | |
intz = pytz.timezone('Asia/Kolkata') | |
nowdt = datetime.now(intz) | |
todaydt = datetime(2012,6,15,tzinfo=intz) | |
assert(todaydt.tzinfo == nowdt.tzinfo) | |
print todaydt | |
print nowdt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its the same for any. IST is taken from Kolkata only so No Problem