首頁 > 後端開發 > C++ > TimeZoneInfo.FindTimeZoneById() 的時區識別碼的完整清單是什麼?

TimeZoneInfo.FindTimeZoneById() 的時區識別碼的完整清單是什麼?

Linda Hamilton
發布: 2025-01-13 15:37:43
原創
249 人瀏覽過

What is a comprehensive list of timezone identifiers for TimeZoneInfo.FindTimeZoneById()?

TimeZoneInfo.FindTimeZoneById() 方法的時區標識符完整列表

TimeZoneInfo 類別中的 FindTimeZoneById() 方法允許開發人員根據其識別碼存取特定的時區資訊。本文提供這些識別符的完整列表,方便參考。

時區 ID 清單:

要取得完整的時區 ID 列表,我們可以使用一個簡單的程序,使用 TimeZoneInfo.GetSystemTimeZones() 迭代所有可用的時區:

<code class="language-csharp">using System;

namespace TimeZoneIds
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones())
            {
                Console.WriteLine(z.Id);
            }
        }
    }
}</code>
登入後複製

在 Windows 7 工作站上執行此程式會產生以下時區 ID 清單:

<code>Dateline Standard Time
UTC-11
Samoa Standard Time
Hawaiian Standard Time
Alaskan Standard Time
Pacific Standard Time (Mexico)
Pacific Standard Time
US Mountain Standard Time
Mountain Standard Time (Mexico)
Mountain Standard Time
Central America Standard Time
Central Standard Time
Central Standard Time (Mexico)
Canada Central Standard Time
SA Pacific Standard Time
Eastern Standard Time
US Eastern Standard Time
Venezuela Standard Time
Paraguay Standard Time
Atlantic Standard Time
Central Brazilian Standard Time
SA Western Standard Time
Pacific SA Standard Time
Newfoundland Standard Time
E. South America Standard Time
Argentina Standard Time
SA Eastern Standard Time
Greenland Standard Time
Montevideo Standard Time
UTC-02
Mid-Atlantic Standard Time
Azores Standard Time
Cape Verde Standard Time
Morocco Standard Time
UTC
GMT Standard Time
Greenwich Standard Time
W. Europe Standard Time
Central Europe Standard Time
Romance Standard Time
Central European Standard Time
W. Central Africa Standard Time
Namibia Standard Time
Jordan Standard Time
GTB Standard Time
Middle East Standard Time
Egypt Standard Time
Syria Standard Time
South Africa Standard Time
FLE Standard Time
Israel Standard Time
E. Europe Standard Time
Arabic Standard Time
Arab Standard Time
Russian Standard Time
E. Africa Standard Time
Iran Standard Time
Arabian Standard Time
Azerbaijan Standard Time
Mauritius Standard Time
Georgian Standard Time
Caucasus Standard Time
Afghanistan Standard Time
Ekaterinburg Standard Time
Pakistan Standard Time
West Asia Standard Time
India Standard Time
Sri Lanka Standard Time
Nepal Standard Time
Central Asia Standard Time
Bangladesh Standard Time
N. Central Asia Standard Time
Myanmar Standard Time
SE Asia Standard Time
North Asia Standard Time
China Standard Time
North Asia East Standard Time
Singapore Standard Time
W. Australia Standard Time
Taipei Standard Time
Ulaanbaatar Standard Time
Tokyo Standard Time
Korea Standard Time
Yakutsk Standard Time
Cen. Australia Standard Time
AUS Central Standard Time
E. Australia Standard Time
AUS Eastern Standard Time
West Pacific Standard Time
Tasmania Standard Time
Vladivostok Standard Time
Central Pacific Standard Time
New Zealand Standard Time
UTC+12
Fiji Standard Time
Kamchatka Standard Time
Tonga Standard Time</code>
登入後複製

此清單為使用 FindTimeZoneById() 和各種時區識別碼的開發人員提供了全面的參考。

以上是TimeZoneInfo.FindTimeZoneById() 的時區識別碼的完整清單是什麼?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板