So, I am facing a problem in timezone conversion. I know that in pytz library, if you pass timezone name, you will get timezone object. Ex. timezone('Asia/Kolkata'). But, is there any way that we can retrieve the timezone using UTC offset or timezone abbreviation. 1. If I pass some_func('UTC+5:30') gives me 'Asia/Kolkata' or timezone object. 2. If I pass some_func('IST') it gives me 'Asia/Kolkata' or timezone object.
Asked
Active
Viewed 118 times
0
-
You want to remove 'UTC+5:30' ? – dl.meteo Mar 22 '17 at 08:37
-
Related - http://stackoverflow.com/a/9938035/2689986 – shad0w_wa1k3r Mar 22 '17 at 08:45
-
@ashish I don't want to keep any manual mapping – reetesh11 Mar 22 '17 at 08:53
-
@dl.meteo : No, I don't want to remove UTC+5:30, I want to get timezone using this offset. – reetesh11 Mar 22 '17 at 09:08