I am looking for a method which can fetch available time zones.
Using .net framework 3.5 I got method to do the same, but I am looking to fetch it using .net framework 2.0.
.net framework 3.5 specific code is as follows;
Dim timeZones As ReadOnlyCollection(Of TimeZoneInfo) = TimeZoneInfo.GetSystemTimeZones()
For Each timeZoneInfo As TimeZoneInfo In timeZones
Console.WriteLine("{0}", timeZoneInfo.DisplayName)
Next
Thanks in advance for any kind of help.
I believe this article contains the source that is compatible with .NET 2.0:
http://www.codeproject.com/KB/vb/TimeZoneInfo.aspx
If you grab their source you can check out how they did
GetTimeZones
method for theirTimeZone
class.