pytz is giving me incorrect timezone information
Created by Stuart Bishop
- Keywords:
- incorrect timezone offset
- Last updated by:
- Stuart Bishop
Localized timestamps need to be created as described in the README.txt, which is different to the method described in the Python manuals.
>>> tz = pytz.timezone(
>>> mydate = datetime.
>>> print tz.localize(mydate)
2007-02-18 15:35:00+05:30
Yes, it sucks that the API is different to that described in the Python manuals, but was the best that could be done while achieving the goal of being able to do non-ambiguous localized timestamp arithmetic.