I have the UTC offset in my DB for the users:
+5:30
How can I get the timezone abbreviation from this UTC offset using Python?
Such as
+5:30 => IST
Is it even possible to do this using Python?
This is not possible.
There are many time zones that share the same offset. See this Wikipedia article for details.
There is no uniform standard for time zone abbreviations. There are some listed here and here, and you can see that there are duplicates in both directions.
For example:
Read also the section "Time Zone != Offset" of the timezone tag wiki here on StackOverflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With