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!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.