53

Possible Duplicate:
How do I enumerate all time zones in .NET?

How can I get the list of time zones with c#? I want a list like the one windows has.

0

3 Answers 3

95

GetSystemTimeZones().

ReadOnlyCollection<TimeZoneInfo> tz;
tz= TimeZoneInfo.GetSystemTimeZones();

Keep in mind that this returns a ReadOnlyCollection(T)

You can also learn how to populate a list with those timezones here.

1
  • 11
    Thank you! And to whoever marked this as a duplicate, please get off your high horse. This was the first result on google. Sorry I don't want to hunt all over the Internet to find an answer someone may have given 10 years ago. Commented Jun 1, 2018 at 12:29
9

You can use TimeZoneInfo.GetSystemTimeZones().

6
TimeZoneInfo.GetSystemTimeZones()

Not the answer you're looking for? Browse other questions tagged or ask your own question.