Hi SO!
Say I have the value: -5 that represents a TimeZone (GMT-5).
How can I convert that into: "Central DST" or something similarly textual using C# and the .NET framework?
Thanks!
Hi SO!
Say I have the value: -5 that represents a TimeZone (GMT-5).
How can I convert that into: "Central DST" or something similarly textual using C# and the .NET framework?
Thanks!
Using .NET 3.5 you can use TimeZoneInfo.GetSystemTimeZones(), and then iterate through until you find a match using BaseUtcOffset.
Be warned that there may be multiple entries per offset, so your results will be somewhat arbitrary.