Welcome to collectivesolver - Programming & Software Q&A with Examples. A website you can trust. All programs tested and work.

Contact: aviboots(AT)netvision.net.il


Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Dental Dog Chews
FRESH BREATHIES

GlucoTrust is a brand new, science-backed supplement that supports healthy blood sugar levels AND weight loss for men and women

Everything you need to sell anywhere

Managed VPS Hosting
Affordable. Secure. Your Own Virtual Private Hosting. Faster than AWS and Rackspace

Bonsai Boy of New York Bonsai Trees and Accessories
100%

Disclosure We are a professional Programming & Software Q&A website, that receives compensation from some of the links whose we show you with Information. It means that my content may contain affiliate links.

24,887 questions

32,502 answers

573 users

How to display all the current system TimeZones in C#

1 Answer

0 votes
using System;
using System.Collections.ObjectModel;

public class Program
{
    public static void Main() {
        ReadOnlyCollection<TimeZoneInfo> zones = TimeZoneInfo.GetSystemTimeZones();  
        Console.WriteLine("The local system has {0} time zones \n", zones.Count);  
        
        foreach (TimeZoneInfo zone in zones)  
            Console.WriteLine(zone.Id);  
    }
}
   
   
     
     
/*
run:
     
The local system has 424 time zones 

Pacific/Niue
Pacific/Midway
Pacific/Pago_Pago
Pacific/Tahiti
Pacific/Rarotonga
Pacific/Honolulu
America/Adak
Pacific/Marquesas
Pacific/Gambier
America/Sitka
America/Anchorage
America/Juneau
America/Nome
America/Yakutat
America/Metlakatla
Pacific/Pitcairn
America/Los_Angeles
America/Tijuana
America/Vancouver
America/Whitehorse
America/Dawson
America/Boise
America/Fort_Nelson
America/Phoenix
America/Denver
America/Mazatlan
America/Inuvik
America/Creston
America/Chihuahua
America/Ojinaga
America/Hermosillo
America/Yellowknife
America/Cambridge_Bay
America/Edmonton
America/Dawson_Creek
Pacific/Galapagos
Pacific/Easter
America/Winnipeg
America/Merida
America/Mexico_City
America/Regina
America/Resolute
America/Rankin_Inlet
America/Chicago
America/Rainy_River
America/Swift_Current
America/North_Dakota/Beulah
America/Indiana/Knox
America/Tegucigalpa
America/Guatemala
America/Managua
America/Bahia_Banderas
America/Indiana/Tell_City
America/Matamoros
America/Monterrey
America/Costa_Rica
America/El_Salvador
America/Belize
America/North_Dakota/New_Salem
America/North_Dakota/Center
America/Menominee
America/Guayaquil
America/Rio_Branco
America/Eirunepe
America/Bogota
America/Lima
America/Havana
America/Nipigon
America/Thunder_Bay
America/Iqaluit
America/Pangnirtung
America/Atikokan
America/New_York
America/Panama
America/Kentucky/Louisville
America/Cayman
America/Grand_Turk
America/Cancun
America/Detroit
America/Port-au-Prince
America/Toronto
America/Jamaica
America/Indiana/Marengo
America/Indiana/Winamac
America/Indiana/Petersburg
America/Indiana/Vevay
America/Indiana/Indianapolis
America/Indiana/Vincennes
America/Nassau
America/Kentucky/Monticello
America/La_Paz
America/Guyana
America/Caracas
America/Santiago
America/Asuncion
America/Campo_Grande
America/Porto_Velho
America/Boa_Vista
America/Manaus
America/Cuiaba
America/Guadeloupe
America/St_Lucia
America/Lower_Princes
America/Grenada
America/Thule
America/Barbados
America/Marigot
America/Aruba
America/Santo_Domingo
America/Dominica
America/Martinique
America/Montserrat
America/St_Barthelemy
America/Halifax
America/Glace_Bay
America/Moncton
America/Goose_Bay
America/Blanc-Sablon
America/St_Thomas
America/St_Kitts
America/Puerto_Rico
America/Antigua
America/Anguilla
America/St_Vincent
America/Port_of_Spain
America/Kralendijk
Atlantic/Bermuda
America/Tortola
America/Curacao
America/St_Johns
America/Argentina/San_Juan
America/Nuuk
America/Belem
America/Cayenne
Antarctica/Palmer
America/Fortaleza
Antarctica/Rothera
America/Recife
America/Argentina/Buenos_Aires
America/Araguaina
Atlantic/Stanley
America/Paramaribo
America/Montevideo
America/Maceio
America/Argentina/Salta
America/Argentina/Jujuy
America/Argentina/Cordoba
America/Miquelon
America/Santarem
America/Argentina/Rio_Gallegos
America/Argentina/San_Luis
America/Argentina/Mendoza
America/Argentina/Tucuman
America/Argentina/Ushuaia
America/Sao_Paulo
America/Bahia
America/Argentina/La_Rioja
America/Argentina/Catamarca
America/Punta_Arenas
America/Noronha
Atlantic/South_Georgia
Atlantic/Cape_Verde
America/Scoresbysund
Atlantic/Azores
Antarctica/Troll
Africa/Bamako
Europe/Isle_of_Man
Atlantic/St_Helena
Atlantic/Reykjavik
Africa/Bissau
Europe/Jersey
Africa/Accra
Africa/Dakar
Africa/Sao_Tome
Africa/Conakry
Africa/Freetown
Europe/London
Europe/Guernsey
Africa/Ouagadougou
America/Danmarkshavn
Africa/Abidjan
Africa/Banjul
Africa/Monrovia
Africa/Lome
Africa/Nouakchott
Atlantic/Canary
Atlantic/Madeira
Atlantic/Faroe
Europe/Lisbon
Africa/Casablanca
Africa/El_Aaiun
Europe/Podgorica
Europe/Warsaw
Europe/Malta
Europe/Skopje
Europe/Amsterdam
Europe/Vaduz
Europe/Monaco
Europe/Oslo
Europe/Luxembourg
Europe/Andorra
Europe/Madrid
Africa/Algiers
Europe/Rome
Africa/Ceuta
Europe/Berlin
Europe/San_Marino
Europe/Paris
Europe/Prague
Africa/Tunis
Europe/Zurich
Europe/Brussels
Europe/Copenhagen
Europe/Sarajevo
Europe/Gibraltar
Europe/Vienna
Arctic/Longyearbyen
Europe/Ljubljana
Europe/Zagreb
Europe/Budapest
Europe/Stockholm
Europe/Vatican
Europe/Tirane
Europe/Belgrade
Europe/Bratislava
Europe/Busingen
Europe/Dublin
Africa/Lagos
Africa/Luanda
Africa/Malabo
Africa/Libreville
Africa/Ndjamena
Africa/Porto-Novo
Africa/Douala
Africa/Bangui
Africa/Brazzaville
Africa/Niamey
Africa/Kinshasa
Africa/Blantyre
Africa/Windhoek
Africa/Khartoum
Africa/Maputo
Africa/Kigali
Africa/Juba
Africa/Harare
Africa/Lusaka
Africa/Bujumbura
Africa/Gaborone
Africa/Lubumbashi
Asia/Nicosia
Europe/Kaliningrad
Asia/Hebron
Europe/Sofia
Asia/Gaza
Asia/Amman
Europe/Mariehamn
Europe/Athens
Asia/Beirut
Europe/Zaporozhye
Africa/Cairo
Asia/Famagusta
Europe/Tallinn
Asia/Damascus
Europe/Vilnius
Europe/Helsinki
Europe/Bucharest
Europe/Uzhgorod
Europe/Chisinau
Africa/Tripoli
Europe/Riga
Europe/Kiev
Asia/Jerusalem
Africa/Mbabane
Africa/Johannesburg
Africa/Maseru
Asia/Baghdad
Asia/Riyadh
Europe/Kirov
Europe/Volgograd
Asia/Bahrain
Europe/Minsk
Asia/Qatar
Antarctica/Syowa
Europe/Istanbul
Asia/Kuwait
Asia/Aden
Africa/Mogadishu
Africa/Dar_es_Salaam
Africa/Kampala
Indian/Antananarivo
Indian/Comoro
Africa/Addis_Ababa
Africa/Asmara
Indian/Mayotte
Africa/Djibouti
Africa/Nairobi
Europe/Moscow
Europe/Simferopol
Asia/Tehran
Indian/Reunion
Asia/Dubai
Asia/Tbilisi
Europe/Saratov
Asia/Baku
Indian/Mauritius
Europe/Ulyanovsk
Asia/Yerevan
Europe/Samara
Indian/Mahe
Asia/Muscat
Europe/Astrakhan
Asia/Kabul
Asia/Oral
Antarctica/Mawson
Asia/Atyrau
Indian/Kerguelen
Asia/Dushanbe
Asia/Ashgabat
Indian/Maldives
Asia/Aqtau
Asia/Aqtobe
Asia/Samarkand
Asia/Yekaterinburg
Asia/Tashkent
Asia/Qyzylorda
Asia/Karachi
Asia/Colombo
Asia/Kolkata
Asia/Kathmandu
Asia/Dhaka
Asia/Almaty
Indian/Chagos
Asia/Urumqi
Asia/Omsk
Asia/Bishkek
Asia/Thimphu
Antarctica/Vostok
Asia/Qostanay
Indian/Cocos
Asia/Yangon
Indian/Christmas
Asia/Phnom_Penh
Asia/Bangkok
Asia/Novokuznetsk
Asia/Vientiane
Asia/Ho_Chi_Minh
Asia/Krasnoyarsk
Asia/Hovd
Antarctica/Davis
Asia/Novosibirsk
Asia/Barnaul
Asia/Tomsk
Asia/Jakarta
Asia/Pontianak
Asia/Irkutsk
Asia/Kuching
Asia/Brunei
Asia/Kuala_Lumpur
Asia/Ulaanbaatar
Asia/Singapore
Asia/Choibalsan
Australia/Perth
Asia/Macau
Asia/Shanghai
Asia/Taipei
Asia/Hong_Kong
Asia/Manila
Asia/Makassar
Australia/Eucla
Asia/Dili
Pacific/Palau
Asia/Chita
Asia/Yakutsk
Asia/Khandyga
Asia/Tokyo
Asia/Pyongyang
Asia/Seoul
Asia/Jayapura
Australia/Broken_Hill
Australia/Adelaide
Australia/Darwin
Antarctica/DumontDUrville
Pacific/Port_Moresby
Asia/Ust-Nera
Asia/Vladivostok
Pacific/Chuuk
Australia/Hobart
Antarctica/Macquarie
Australia/Melbourne
Australia/Sydney
Australia/Brisbane
Australia/Lindeman
Pacific/Saipan
Pacific/Guam
Australia/Lord_Howe
Pacific/Bougainville
Pacific/Norfolk
Pacific/Noumea
Pacific/Efate
Pacific/Guadalcanal
Asia/Srednekolymsk
Asia/Magadan
Pacific/Kosrae
Pacific/Pohnpei
Asia/Sakhalin
Antarctica/Casey
Pacific/Nauru
Pacific/Majuro
Pacific/Wallis
Pacific/Kwajalein
Pacific/Funafuti
Pacific/Wake
Asia/Anadyr
Pacific/Tarawa
Asia/Kamchatka
Pacific/Fiji
Pacific/Auckland
Antarctica/McMurdo
Pacific/Chatham
Pacific/Fakaofo
Pacific/Kanton
Pacific/Apia
Pacific/Tongatapu
Pacific/Kiritimati
     
*/

 




answered 2 days ago by avibootz
...