Elenco degli ID di fuso orario da utilizzare con FindTimeZoneById () in C #?

Qualcuno può per favore indicarmi un elenco completo di tutti i fusi orari a cui fa riferimento l’ID previsto in TimeZoneInfo.FindTimeZoneById() ? Non riesco a trovare un elenco da nessuna parte e ho esaminato la documentazione di .NET.

Ecco un elenco completo di un programma e dei suoi risultati .

Il codice:

 using System; namespace TimeZoneIds { class Program { static void Main(string[] args) { foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones()) Console.WriteLine(z.Id); } } } 

I risultati TimeZoneId sulla mia workstation Windows 7:

Dateline Standard Time

UTC-11

Samoa Standard Time

Hawaiian Standard Time

Alaskan Standard Time

Pacific Standard Time (Messico)

Pacific Standard Time

Tempo standard della montagna degli Stati Uniti

Mountain Standard Time (Messico)

Mountain Standard Time

Ora standard dell’America centrale

Central Standard Time

Central Standard Time (Messico)

Canada Standard Standard Time

SA Standard Time Time

Eastern Standard Time

Ora standard degli Stati Uniti orientale

Ora standard del Venezuela

Ora standard del Paraguay

Atlantic Standard Time

Tempo standard brasiliano centrale

SA Ora standard occidentale

Pacific Standard Time Time

Ora standard di Terranova

E. Ora standard del Sud America

Ora solare dell’Argentina

SA Ora standard orientale

Ora standard della Groenlandia

Ora standard di Montevideo

UTC-02

Mid-Atlantic Standard Time

Ora standard delle Azzorre

Ora standard di Capo Verde

Ora standard del Marocco

UTC

Ora standard GMT

Ora standard di Greenwich

W. Ora solare dell’Europa

Ora standard dell’Europa centrale

Romance Standard Time

Ora standard dell’Europa centrale

W. Africa centrale Ora solare

Ora standard della Namibia

Jordan Standard Time

Ora standard GTB

Medio Oriente Standard Time

Ora standard dell’Egitto

Ora standard della Siria

Ora standard del Sudafrica

FLE Standard Time

Israele Standard Time

E. Ora solare Europa

Ora standard araba

Ora standard araba

Ora standard russa

E. Ora solare Africa

Iran Standard Time

Ora standard araba

Ora standard dell’Azerbaigian

Ora standard di Mauritius

Ora standard georgiana

Tempo standard del Caucaso

Ora standard dell’Afghanistan

Ora standard di Ekaterinburg

Ora standard del Pakistan

Ora standard dell’Asia occidentale

India Standard Time

Ora standard dello Sri Lanka

Ora standard del Nepal

Ora standard Asia centrale

Bangladesh Standard Time

N. Tempo standard dell’Asia centrale

Myanmar Standard Time

SE Standard Time Asia

Ora standard Asia settentrionale

Ora standard della Cina

Ora standard del nord est asiatico

Ora standard di Singapore

W. Australia Standard Time

Ora standard di Taipei

Ulaanbaatar Standard Time

Tokyo Standard Time

Ora standard della Corea

Yakutsk Standard Time

Cen. Ora standard australiana

AUS Central Standard Time

E. Ora solare dell’Australia

AUS Eastern Standard Time

Ora standard del Pacifico occidentale

Tasmania Standard Time

Vladivostok Standard Time

Ora standard del Pacifico centrale

Ora standard della Nuova Zelanda

GMT + 12

Tempo standard delle Fiji

Ora standard Kamchatka

Tonga Standard Time

E se desideri che un HTML venga selezionato con i fusi orari di Windows in:

  

E se desideri utilizzarlo in C # .NET MVC in una visualizzazione Razor:

 var timezones = new List { new SelectListItem() { Value="", Text="Select timezone...", Selected = false }, new SelectListItem() { Value="Morocco Standard Time", Text="(GMT) Casablanca", Selected = false }, new SelectListItem() { Value="GMT Standard Time", Text="(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London", Selected = false }, new SelectListItem() { Value="Greenwich Standard Time", Text="(GMT) Monrovia, Reykjavik", Selected = false }, new SelectListItem() { Value="W. Europe Standard Time", Text="(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", Selected = false }, new SelectListItem() { Value="Central Europe Standard Time", Text="(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", Selected = false }, new SelectListItem() { Value="Romance Standard Time", Text="(GMT+01:00) Brussels, Copenhagen, Madrid, Paris", Selected = false }, new SelectListItem() { Value="Central European Standard Time", Text="(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb", Selected = false }, new SelectListItem() { Value="W. Central Africa Standard Time", Text="(GMT+01:00) West Central Africa", Selected = false }, new SelectListItem() { Value="Jordan Standard Time", Text="(GMT+02:00) Amman", Selected = false }, new SelectListItem() { Value="GTB Standard Time", Text="(GMT+02:00) Athens, Bucharest, Istanbul", Selected = false }, new SelectListItem() { Value="Middle East Standard Time", Text="(GMT+02:00) Beirut", Selected = false }, new SelectListItem() { Value="Egypt Standard Time", Text="(GMT+02:00) Cairo", Selected = false }, new SelectListItem() { Value="South Africa Standard Time", Text="(GMT+02:00) Harare, Pretoria", Selected = false }, new SelectListItem() { Value="FLE Standard Time", Text="(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", Selected = false }, new SelectListItem() { Value="Israel Standard Time", Text="(GMT+02:00) Jerusalem", Selected = false }, new SelectListItem() { Value="E. Europe Standard Time", Text="(GMT+02:00) Minsk", Selected = false }, new SelectListItem() { Value="Namibia Standard Time", Text="(GMT+02:00) Windhoek", Selected = false }, new SelectListItem() { Value="Arabic Standard Time", Text="(GMT+03:00) Baghdad", Selected = false }, new SelectListItem() { Value="Arab Standard Time", Text="(GMT+03:00) Kuwait, Riyadh", Selected = false }, new SelectListItem() { Value="Russian Standard Time", Text="(GMT+03:00) Moscow, St. Petersburg, Volgograd", Selected = false }, new SelectListItem() { Value="E. Africa Standard Time", Text="(GMT+03:00) Nairobi", Selected = false }, new SelectListItem() { Value="Georgian Standard Time", Text="(GMT+03:00) Tbilisi", Selected = false }, new SelectListItem() { Value="Iran Standard Time", Text="(GMT+03:30) Tehran", Selected = false }, new SelectListItem() { Value="Arabian Standard Time", Text="(GMT+04:00) Abu Dhabi, Muscat", Selected = false }, new SelectListItem() { Value="Azerbaijan Standard Time", Text="(GMT+04:00) Baku", Selected = false }, new SelectListItem() { Value="Mauritius Standard Time", Text="(GMT+04:00) Port Louis", Selected = false }, new SelectListItem() { Value="Caucasus Standard Time", Text="(GMT+04:00) Yerevan", Selected = false }, new SelectListItem() { Value="Afghanistan Standard Time", Text="(GMT+04:30) Kabul", Selected = false }, new SelectListItem() { Value="Ekaterinburg Standard Time", Text="(GMT+05:00) Ekaterinburg", Selected = false }, new SelectListItem() { Value="Pakistan Standard Time", Text="(GMT+05:00) Islamabad, Karachi", Selected = false }, new SelectListItem() { Value="West Asia Standard Time", Text="(GMT+05:00) Tashkent", Selected = false }, new SelectListItem() { Value="India Standard Time", Text="(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi", Selected = false }, new SelectListItem() { Value="Sri Lanka Standard Time", Text="(GMT+05:30) Sri Jayawardenepura", Selected = false }, new SelectListItem() { Value="Nepal Standard Time", Text="(GMT+05:45) Kathmandu", Selected = false }, new SelectListItem() { Value="N. Central Asia Standard Time", Text="(GMT+06:00) Almaty, Novosibirsk", Selected = false }, new SelectListItem() { Value="Central Asia Standard Time", Text="(GMT+06:00) Astana, Dhaka", Selected = false }, new SelectListItem() { Value="Myanmar Standard Time", Text="(GMT+06:30) Yangon (Rangoon)", Selected = false }, new SelectListItem() { Value="SE Asia Standard Time", Text="(GMT+07:00) Bangkok, Hanoi, Jakarta", Selected = false }, new SelectListItem() { Value="North Asia Standard Time", Text="(GMT+07:00) Krasnoyarsk", Selected = false }, new SelectListItem() { Value="China Standard Time", Text="(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi", Selected = false }, new SelectListItem() { Value="North Asia East Standard Time", Text="(GMT+08:00) Irkutsk, Ulaan Bataar", Selected = false }, new SelectListItem() { Value="Singapore Standard Time", Text="(GMT+08:00) Kuala Lumpur, Singapore", Selected = false }, new SelectListItem() { Value="W. Australia Standard Time", Text="(GMT+08:00) Perth", Selected = false }, new SelectListItem() { Value="Taipei Standard Time", Text="(GMT+08:00) Taipei", Selected = false }, new SelectListItem() { Value="Tokyo Standard Time", Text="(GMT+09:00) Osaka, Sapporo, Tokyo", Selected = false }, new SelectListItem() { Value="Korea Standard Time", Text="(GMT+09:00) Seoul", Selected = false }, new SelectListItem() { Value="Yakutsk Standard Time", Text="(GMT+09:00) Yakutsk", Selected = false }, new SelectListItem() { Value="Cen. Australia Standard Time", Text="(GMT+09:30) Adelaide", Selected = false }, new SelectListItem() { Value="AUS Central Standard Time", Text="(GMT+09:30) Darwin", Selected = false }, new SelectListItem() { Value="E. Australia Standard Time", Text="(GMT+10:00) Brisbane", Selected = false }, new SelectListItem() { Value="AUS Eastern Standard Time", Text="(GMT+10:00) Canberra, Melbourne, Sydney", Selected = false }, new SelectListItem() { Value="West Pacific Standard Time", Text="(GMT+10:00) Guam, Port Moresby", Selected = false }, new SelectListItem() { Value="Tasmania Standard Time", Text="(GMT+10:00) Hobart", Selected = false }, new SelectListItem() { Value="Vladivostok Standard Time", Text="(GMT+10:00) Vladivostok", Selected = false }, new SelectListItem() { Value="Central Pacific Standard Time", Text="(GMT+11:00) Magadan, Solomon Is., New Caledonia", Selected = false }, new SelectListItem() { Value="New Zealand Standard Time", Text="(GMT+12:00) Auckland, Wellington", Selected = false }, new SelectListItem() { Value="Fiji Standard Time", Text="(GMT+12:00) Fiji, Kamchatka, Marshall Is.", Selected = false }, new SelectListItem() { Value="Tonga Standard Time", Text="(GMT+13:00) Nuku'alofa", Selected = false }, new SelectListItem() { Value="Azores Standard Time", Text="(GMT-01:00) Azores", Selected = false }, new SelectListItem() { Value="Cape Verde Standard Time", Text="(GMT-01:00) Cape Verde Is.", Selected = false }, new SelectListItem() { Value="Mid-Atlantic Standard Time", Text="(GMT-02:00) Mid-Atlantic", Selected = false }, new SelectListItem() { Value="E. South America Standard Time", Text="(GMT-03:00) Brasilia", Selected = false }, new SelectListItem() { Value="Argentina Standard Time", Text="(GMT-03:00) Buenos Aires", Selected = false }, new SelectListItem() { Value="SA Eastern Standard Time", Text="(GMT-03:00) Georgetown", Selected = false }, new SelectListItem() { Value="Greenland Standard Time", Text="(GMT-03:00) Greenland", Selected = false }, new SelectListItem() { Value="Montevideo Standard Time", Text="(GMT-03:00) Montevideo", Selected = false }, new SelectListItem() { Value="Newfoundland Standard Time", Text="(GMT-03:30) Newfoundland", Selected = false }, new SelectListItem() { Value="Atlantic Standard Time", Text="(GMT-04:00) Atlantic Time (Canada)", Selected = false }, new SelectListItem() { Value="SA Western Standard Time", Text="(GMT-04:00) La Paz", Selected = false }, new SelectListItem() { Value="Central Brazilian Standard Time", Text="(GMT-04:00) Manaus", Selected = false }, new SelectListItem() { Value="Pacific SA Standard Time", Text="(GMT-04:00) Santiago", Selected = false }, new SelectListItem() { Value="Venezuela Standard Time", Text="(GMT-04:30) Caracas", Selected = false }, new SelectListItem() { Value="SA Pacific Standard Time", Text="(GMT-05:00) Bogota, Lima, Quito, Rio Branco", Selected = false }, new SelectListItem() { Value="Eastern Standard Time", Text="(GMT-05:00) Eastern Time (US & Canada)", Selected = false }, new SelectListItem() { Value="US Eastern Standard Time", Text="(GMT-05:00) Indiana (East)", Selected = false }, new SelectListItem() { Value="Central America Standard Time", Text="(GMT-06:00) Central America", Selected = false }, new SelectListItem() { Value="Central Standard Time", Text="(GMT-06:00) Central Time (US & Canada)", Selected = false }, new SelectListItem() { Value="Central Standard Time (Mexico)", Text="(GMT-06:00) Guadalajara, Mexico City, Monterrey", Selected = false }, new SelectListItem() { Value="Canada Central Standard Time", Text="(GMT-06:00) Saskatchewan", Selected = false }, new SelectListItem() { Value="US Mountain Standard Time", Text="(GMT-07:00) Arizona", Selected = false }, new SelectListItem() { Value="Mountain Standard Time (Mexico)", Text="(GMT-07:00) Chihuahua, La Paz, Mazatlan", Selected = false }, new SelectListItem() { Value="Mountain Standard Time", Text="(GMT-07:00) Mountain Time (US & Canada)", Selected = false }, new SelectListItem() { Value="Pacific Standard Time", Text="(GMT-08:00) Pacific Time (US & Canada)", Selected = false }, new SelectListItem() { Value="Pacific Standard Time (Mexico)", Text="(GMT-08:00) Tijuana, Baja California", Selected = false }, new SelectListItem() { Value="Alaskan Standard Time", Text="(GMT-09:00) Alaska", Selected = false }, new SelectListItem() { Value="Hawaiian Standard Time", Text="(GMT-10:00) Hawaii", Selected = false }, new SelectListItem() { Value="Samoa Standard Time", Text="(GMT-11:00) Midway Island, Samoa", Selected = false }, new SelectListItem() { Value="Dateline Standard Time", Text="(GMT-12:00) International Date Line West", Selected = false } } 

Anche se per Razor puoi semplicemente generare le opzioni scorrendo attraverso TimeZoneInfo.GetSystemTimeZones()

Ecco il link che stai cercando:

C # System timeZoneID’s

Qui troverai l’elenco completo del fuso orario con le sue GMToffsets e puoi utilizzare il valore della colonna “Nome del fuso orario” per trovare il fuso orario per ID

per esempio

 TimeZoneInfo objTimeZoneInfo = TimeZoneInfo.FindTimeZoneById("Dateline Standard Time"); 

Otterrai una class di informazioni sul fuso orario che contiene il fuso orario standard della data di trasmissione utilizzato per GMT-12: 00 .

Da MSDN

 ReadOnlyCollection zones = TimeZoneInfo.GetSystemTimeZones(); Console.WriteLine("The local system has the following {0} time zones", zones.Count); foreach (TimeZoneInfo zone in zones) Console.WriteLine(zone.Id); 

So che sono vecchie e vecchie domande, ma Microsoft sembra aver fornito questo tramite MSDN ora.

http://msdn.microsoft.com/en-us/library/gg154758.aspx

Ed ecco una versione Json che ho convertito dalla risposta di ProfNimrod …

 { tZCode : "Morocco Standard Time", tZDesc : "(GMT) Casablanca" }, { tZCode : "GMT Standard Time", tZDesc : "(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London" }, { tZCode : "Greenwich Standard Time", tZDesc : "(GMT) Monrovia, Reykjavik" }, { tZCode : "W. Europe Standard Time", tZDesc : "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" }, { tZCode : "Central Europe Standard Time", tZDesc : "(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague" }, { tZCode : "Romance Standard Time", tZDesc : "(GMT+01:00) Brussels, Copenhagen, Madrid, Paris" }, { tZCode : "Central European Standard Time", tZDesc : "(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb" }, { tZCode : "W. Central Africa Standard Time", tZDesc : "(GMT+01:00) West Central Africa" }, { tZCode : "Jordan Standard Time", tZDesc : "(GMT+02:00) Amman" }, { tZCode : "GTB Standard Time", tZDesc : "(GMT+02:00) Athens, Bucharest, Istanbul" }, { tZCode : "Middle East Standard Time", tZDesc : "(GMT+02:00) Beirut" }, { tZCode : "Egypt Standard Time", tZDesc : "(GMT+02:00) Cairo" }, { tZCode : "South Africa Standard Time", tZDesc : "(GMT+02:00) Harare, Pretoria" }, { tZCode : "FLE Standard Time", tZDesc : "(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius" }, { tZCode : "Israel Standard Time", tZDesc : "(GMT+02:00) Jerusalem" }, { tZCode : "E. Europe Standard Time", tZDesc : "(GMT+02:00) Minsk" }, { tZCode : "Namibia Standard Time", tZDesc : "(GMT+02:00) Windhoek" }, { tZCode : "Arabic Standard Time", tZDesc : "(GMT+03:00) Baghdad" }, { tZCode : "Arab Standard Time", tZDesc : "(GMT+03:00) Kuwait, Riyadh" }, { tZCode : "Russian Standard Time", tZDesc : "(GMT+03:00) Moscow, St. Petersburg, Volgograd" }, { tZCode : "E. Africa Standard Time", tZDesc : "(GMT+03:00) Nairobi" }, { tZCode : "Georgian Standard Time", tZDesc : "(GMT+03:00) Tbilisi" }, { tZCode : "Iran Standard Time", tZDesc : "(GMT+03:30) Tehran" }, { tZCode : "Arabian Standard Time", tZDesc : "(GMT+04:00) Abu Dhabi, Muscat" }, { tZCode : "Azerbaijan Standard Time", tZDesc : "(GMT+04:00) Baku" }, { tZCode : "Mauritius Standard Time", tZDesc : "(GMT+04:00) Port Louis" }, { tZCode : "Caucasus Standard Time", tZDesc : "(GMT+04:00) Yerevan" }, { tZCode : "Afghanistan Standard Time", tZDesc : "(GMT+04:30) Kabul" }, { tZCode : "Ekaterinburg Standard Time", tZDesc : "(GMT+05:00) Ekaterinburg" }, { tZCode : "Pakistan Standard Time", tZDesc : "(GMT+05:00) Islamabad, Karachi" }, { tZCode : "West Asia Standard Time", tZDesc : "(GMT+05:00) Tashkent" }, { tZCode : "India Standard Time", tZDesc : "(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi" }, { tZCode : "Sri Lanka Standard Time", tZDesc : "(GMT+05:30) Sri Jayawardenepura" }, { tZCode : "Nepal Standard Time", tZDesc : "(GMT+05:45) Kathmandu" }, { tZCode : "N. Central Asia Standard Time", tZDesc : "(GMT+06:00) Almaty, Novosibirsk" }, { tZCode : "Central Asia Standard Time", tZDesc : "(GMT+06:00) Astana, Dhaka" }, { tZCode : "Myanmar Standard Time", tZDesc : "(GMT+06:30) Yangon (Rangoon)" }, { tZCode : "SE Asia Standard Time", tZDesc : "(GMT+07:00) Bangkok, Hanoi, Jakarta" }, { tZCode : "North Asia Standard Time", tZDesc : "(GMT+07:00) Krasnoyarsk" }, { tZCode : "China Standard Time", tZDesc : "(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi" }, { tZCode : "North Asia East Standard Time", tZDesc : "(GMT+08:00) Irkutsk, Ulaan Bataar" }, { tZCode : "Singapore Standard Time", tZDesc : "(GMT+08:00) Kuala Lumpur, Singapore" }, { tZCode : "W. Australia Standard Time", tZDesc : "(GMT+08:00) Perth" }, { tZCode : "Taipei Standard Time", tZDesc : "(GMT+08:00) Taipei" }, { tZCode : "Tokyo Standard Time", tZDesc : "(GMT+09:00) Osaka, Sapporo, Tokyo" }, { tZCode : "Korea Standard Time", tZDesc : "(GMT+09:00) Seoul" }, { tZCode : "Yakutsk Standard Time", tZDesc : "(GMT+09:00) Yakutsk" }, { tZCode : "Cen. Australia Standard Time", tZDesc : "(GMT+09:30) Adelaide" }, { tZCode : "AUS Central Standard Time", tZDesc : "(GMT+09:30) Darwin" }, { tZCode : "E. Australia Standard Time", tZDesc : "(GMT+10:00) Brisbane" }, { tZCode : "AUS Eastern Standard Time", tZDesc : "(GMT+10:00) Canberra, Melbourne, Sydney" }, { tZCode : "West Pacific Standard Time", tZDesc : "(GMT+10:00) Guam, Port Moresby" }, { tZCode : "Tasmania Standard Time", tZDesc : "(GMT+10:00) Hobart" }, { tZCode : "Vladivostok Standard Time", tZDesc : "(GMT+10:00) Vladivostok" }, { tZCode : "Central Pacific Standard Time", tZDesc : "(GMT+11:00) Magadan, Solomon Is., New Caledonia" }, { tZCode : "New Zealand Standard Time", tZDesc : "(GMT+12:00) Auckland, Wellington" }, { tZCode : "Fiji Standard Time", tZDesc : "(GMT+12:00) Fiji, Kamchatka, Marshall Is." }, { tZCode : "Tonga Standard Time", tZDesc : "(GMT+13:00) Nuku'alofa" }, { tZCode : "Azores Standard Time", tZDesc : "(GMT-01:00) Azores" }, { tZCode : "Cape Verde Standard Time", tZDesc : "(GMT-01:00) Cape Verde Is." }, { tZCode : "Mid-Atlantic Standard Time", tZDesc : "(GMT-02:00) Mid-Atlantic" }, { tZCode : "E. South America Standard Time", tZDesc : "(GMT-03:00) Brasilia" }, { tZCode : "Argentina Standard Time", tZDesc : "(GMT-03:00) Buenos Aires" }, { tZCode : "SA Eastern Standard Time", tZDesc : "(GMT-03:00) Georgetown" }, { tZCode : "Greenland Standard Time", tZDesc : "(GMT-03:00) Greenland" }, { tZCode : "Montevideo Standard Time", tZDesc : "(GMT-03:00) Montevideo" }, { tZCode : "Newfoundland Standard Time", tZDesc : "(GMT-03:30) Newfoundland" }, { tZCode : "Atlantic Standard Time", tZDesc : "(GMT-04:00) Atlantic Time (Canada)" }, { tZCode : "SA Western Standard Time", tZDesc : "(GMT-04:00) La Paz" }, { tZCode : "Central Brazilian Standard Time", tZDesc : "(GMT-04:00) Manaus" }, { tZCode : "Pacific SA Standard Time", tZDesc : "(GMT-04:00) Santiago" }, { tZCode : "Venezuela Standard Time", tZDesc : "(GMT-04:30) Caracas" }, { tZCode : "SA Pacific Standard Time", tZDesc : "(GMT-05:00) Bogota, Lima, Quito, Rio Branco" }, { tZCode : "Eastern Standard Time", tZDesc : "(GMT-05:00) Eastern Time (US & Canada)" }, { tZCode : "US Eastern Standard Time", tZDesc : "(GMT-05:00) Indiana (East)" }, { tZCode : "Central America Standard Time", tZDesc : "(GMT-06:00) Central America" }, { tZCode : "Central Standard Time", tZDesc : "(GMT-06:00) Central Time (US & Canada)" }, { tZCode : "Central Standard Time (Mexico)", tZDesc : "(GMT-06:00) Guadalajara, Mexico City, Monterrey" }, { tZCode : "Canada Central Standard Time", tZDesc : "(GMT-06:00) Saskatchewan" }, { tZCode : "US Mountain Standard Time", tZDesc : "(GMT-07:00) Arizona" }, { tZCode : "Mountain Standard Time (Mexico)", tZDesc : "(GMT-07:00) Chihuahua, La Paz, Mazatlan" }, { tZCode : "Mountain Standard Time", tZDesc : "(GMT-07:00) Mountain Time (US & Canada)" }, { tZCode : "Pacific Standard Time", tZDesc : "(GMT-08:00) Pacific Time (US & Canada)" }, { tZCode : "Pacific Standard Time (Mexico)", tZDesc : "(GMT-08:00) Tijuana, Baja California" }, { tZCode : "Alaskan Standard Time", tZDesc : "(GMT-09:00) Alaska" }, { tZCode : "Hawaiian Standard Time", tZDesc : "(GMT-10:00) Hawaii" }, { tZCode : "Samoa Standard Time", tZDesc : "(GMT-11:00) Midway Island, Samoa" }, { tZCode : "Dateline Standard Time", tZDesc : "(GMT-12:00) International Date Line West" } 

Sospetto che questo è ciò che la maggior parte delle persone sta cercando:

Valori indice del fuso orario Microsoft

Spero che MS lo tenga aggiornato anche dopo XP.

List of time zone identifiers, included by default in Windows XP and Vista: Finding the Time Zones Defined on a Local System

var timeZoneInfos = TimeZoneInfo.GetSystemTimeZones(); The above gives you the a lsit of timezones, which includes the ids.

 DateTime dt; TimeZoneInfo tzf; tzf = TimeZoneInfo.FindSystemTimeZoneById("TimeZone String"); dt = TimeZoneInfo.ConvertTime(DateTime.Now, tzf); lbltime.Text = dt.ToString(); 

This is the code fully tested and working for me. You can use it just copy and paste in your aspx page and cs page.

This is my blog you can download full code here. Grazie.

http://www.c-sharpcorner.com/blogs/display-all-the-timezone-information-in-dropdown-list-of-a-local-system-using-c-sharp-with-asp-net

 
Get Current Date And Time Of All TimeZones

Select TimeZone :-
Selected TimeZone :-
Current Date And Time :-