Globalization for GetSystemTimeZones()
- by user300992
I want to get a list of timezones, so that i can populate the dropdown list. In .NET 3.5, we have TimeZoneInfo namespace, here is the code:
ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones();
foreach (TimeZoneInfo timeZone in timeZones)
string name = timeZone.DisplayName
However, "DisplayName" is in English. How can I pass the cultureInfo so that it can return other languages? I tried setting the Thread.CurrentCulture and CurrentUICulture, it didn't work. Am I missing something?