I have no idea how to use datetime.tzinfo
module. I have to convert a datetime data from UTC to local timezone and if I retrieve '+2'(which means gmt+2) how do I convert this to tzinfo object?
Also, is it possible to convert from UTC to local timezone with daylight saving time applied automatically? How do I set to subtract one hour automatically only during dst?
Python doesn't really implement well timezones. According to the documentation, tzinfo is just an abstract class meant to be implemented by the user.
I'd recommend the third party pytz module for dealing with timezones.