I'm rebuilding a site originally written in PHP into ASP.NET. The original application was storing a user's time zone offset for displaying times in their local time. I want to convert this from the numerical offset to the time zone name, if possible, in order to be more accurate.
My initial findings suggest this isn't possible directly. So I'm thinking of sort of looping through, finding the first one that has the same offset and use that. Is there a simpler/more elegant way of doing it that I'm not aware of?
Thanks in advance!
Just for reference, the PHP version database column looks like this (where 0.00
would be equivalent to UTC):
Time_Zone
---------
17.00
10.00
-6
-7.00
12.00
0.00
-6.00
-8.00