zoukankan      html  css  js  c++  java
  • 时区的ID名存储 方便查询

    DateTime dt = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now, TimeZoneInfo.Local);
    DateTime dt1 = TimeZoneInfo.ConvertTimeFromUtc(dt, TimeZoneInfo.FindSystemTimeZoneById("New Zealand Standard Time")); // parameter corresponds to the country or time zone and the countries below the corresponding time zone parameter
    MessageBox.Show("Current Local Time:" + DateTime.Now.ToString()+"
    "+ "UTC :" + dt.ToString() + "
    " + "New Zealand Current:" + dt1.ToString());
     
    /*
             Dateline Standard Time, (GMT-12: 00) Dateline west of the International Date Line Standard Time
             Samoa Standard Time, (GMT-11: 00) Midway Island, Samoa, Samoa Standard Time
             Hawaiian Standard Time, (GMT-10: 00) Hawaii, Hawaii Standard Time
             Alaskan Standard Time, (GMT-09: 00) Alaska, Alaska Standard Time
             Pacific Standard Time, (GMT-08: 00) Pacific Time (US and Canada); Tijuana, Pacific Standard Time
             US Mountain Standard Time, (GMT-07: 00) Arizona, United States Mountain Standard Time
             Mountain Standard Time, (GMT-07: 00) Mountain Time (US and Canada), Mountain Standard Time
             Mexico Standard Time 2, (GMT-07: 00) Chihuahua, La Paz, Mazatlan, Mexico Standard Time 2
             Central America Standard Time, (GMT-06: 00) Central America, Central Standard Time
             Central Standard Time, (GMT-06: 00) Central Time (US and Canada), Central Standard Time
             Canada Central Standard Time, (GMT-06: 00) in central Saskatchewan, Canada Standard Time
             Mexico Standard Time, (GMT-06: 00) Guadalajara, Mexico City, Monterrey, Mexico Standard Time
             Eastern Standard Time, (GMT-05: 00) Eastern Time (US and Canada), Eastern Standard Time
             US Eastern Standard Time, (GMT-05: 00) Indiana (east), US Eastern Standard Time
             SA Pacific Standard Time, (GMT-05: 00) Bogota, Lima, Quito, South America, Pacific Standard Time
             SA Western Standard Time, (GMT-04: 00) Caracas, La Paz, in western South America Standard Time
             Pacific SA Standard Time, (GMT-04: 00) San Diego, South America, Pacific Standard Time
             Atlantic Standard Time, (GMT-04: 00) Atlantic Time (Canada), Atlantic Standard Time
             Newfoundland Standard Time, (GMT-03: 30) Newfoundland, Newfoundland Time
             E. South America Standard Time, (GMT-03: 00) Brasilia, South America, Eastern Standard Time
             SA Eastern Standard Time, (GMT-03: 00) Buenos Aires, Georgetown, South America, Eastern Standard Time
             Greenland Standard Time, (GMT-03: 00) Greenland, Greenland Eastern Standard Time
             Mid-Atlantic Standard Time, (GMT-02: 00) in the Atlantic Ocean, the Atlantic Standard Time
             Azores Standard Time, (GMT-01: 00) Azores, Azores Standard Time
             Cape Verde Standard Time, (GMT-01: 00) Cape Verde Islands, Cape Verde Islands Standard Time
             Greenwich Standard Time, (GMT) Casablanca, Monrovia, Greenwich Mean Time
             GMT Standard Time, (GMT) Greenwich Mean Time: Dublin, Edinburgh, London, Lisbon, Greenwich Mean Time
             W. Central Africa Standard Time, (GMT + 01: 00) in western Africa, western Africa Standard Time
             Romance Standard Time, (GMT + 01: 00) Brussels, Copenhagen, Madrid, Paris, Rome Standard Time
             Central European Standard Time, (GMT + 01: 00) Sarajevo, Skopje, Warsaw, Zagreb, Central Standard Time
             Central Europe Standard Time, (GMT + 01: 00) Belgrade, Bratislava, Budapest, Ljubljana, Prague, Central Standard Time
        W. Europe Standard Time, (GMT + 01: 00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna, Western Standard Time
             South Africa Standard Time, (GMT + 02: 00) Harare, Pretoria, South Africa Standard Time
             E. Europe Standard Time, (GMT + 02: 00) Bucharest, Eastern Standard Time
             Egypt Standard Time, (GMT + 02: 00) Cairo, Egypt Standard Time
             Israel Standard Time, (GMT + 02: 00) Jerusalem, Jerusalem Standard Time
             FLE Standard Time, (GMT + 02: 00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius, FLE Standard Time
             GTB Standard Time, (GMT + 02: 00) Athens, Beirut, Istanbul, Minsk, GTB Standard Time
             E. Africa Standard Time, (GMT + 03: 00) Nairobi, East Africa Standard Time
             Arabic Standard Time, (GMT + 03: 00) Baghdad, Arab Standard Time
             Arab Standard Time, (GMT + 03: 00) Kuwait, Riyadh, Arab Standard Time
             Russian Standard Time, (GMT + 03: 00) Moscow, St. Petersburg, Volgograd, Russia Standard Time
             Iran Standard Time, (GMT + 03: 30) Tehran, Iran Standard Time
             Caucasus Standard Time, (GMT + 04: 00) Baku, Tbilisi, Yerevan, Caucasian Standard Time
             Arabian Standard Time, (GMT + 04: 00) Abu Dhabi, Muscat, Arabian Peninsula Standard Time
             Afghanistan Standard Time, (GMT + 04: 30) Kabul, Afghanistan Standard Time
             West Asia Standard Time, (GMT + 05: 00) Islamabad, Karachi, Tashkent, West Asia Standard Time
             Ekaterinburg Standard Time, (GMT + 05: 00) Yekaterinburg, Yekaterinburg Time
             India Standard Time, (GMT + 05: 30) Madras, Calcutta, Mumbai, New Delhi, India Standard Time
             Nepal Standard Time, (GMT + 05: 45) Kathmandu, Nepal Standard Time
             Sri Lanka Standard Time, (GMT + 06: 00) Silihaya China Denniston Pula, Sri Lanka Standard Time
             N. Central Asia Standard Time, (GMT + 06: 00) Almaty, Novosibirsk, northern Central Standard Time
             Central Asia Standard Time, (GMT + 06: 00) Astana, Dhaka, Central Standard Time
             Myanmar Standard Time, (GMT + 06: 30) Yangon, Myanmar Standard Time
             North Asia Standard Time, (GMT + 07: 00) Krasnoyarsk, North Asia Standard Time
             SE Asia Standard Time, (GMT + 07: 00) Bangkok, Hanoi, Jakarta, Southeast Asia Standard Time
             North Asia East Standard Time, (GMT + 08: 00) Irkutsk, Ulaan map, North Eastern Standard Time
             China Standard Time, (GMT + 08: 00) Beijing, Chongqing, Hong Kong, Urumqi, China Standard Time
             Taipei Standard Time, (GMT + 08: 00), Taipei Standard Time
             Singapore Standard Time, (GMT + 08: 00) Kuala Lumpur, Singapore, Malaysia Peninsula Standard Time
             W. Australia Standard Time, (GMT + 08: 00) Perth, Western Australia Standard Time
             Tokyo Standard Time, (GMT + 09: 00) Osaka, Sapporo, Tokyo, Tokyo Standard Time
             Korea Standard Time, (GMT + 09: 00) Seoul, South Korea Standard Time
             Yakutsk Standard Time, (GMT + 09: 00) Yakutsk, Yakutsk Standard Time
             AUS Central Standard Time, (GMT + 09: 30) Darwin, Australia and Central Standard Time
        Cen Australia Standard Time,. (GMT + 09: 30) Adelaide, Australia Central Standard Time
             West Pacific Standard Time, (GMT + 10: 00) Guam, Port Moresby, the Western Pacific Standard Time
             AUS Eastern Standard Time, (GMT + 10: 00) Canberra, Melbourne, Sydney, Australian Eastern Standard Time
             E. Australia Standard Time, (GMT + 10: 00) Brisbane, Australia Eastern Standard Time
             Vladivostok Standard Time, (GMT + 10: 00) Vladivostok, Vladivostok Standard Time
             Tasmania Standard Time, (GMT + 10: 00) Hobart, Tasmania Standard Time
             Central Pacific Standard Time, (GMT + 11: 00) Magadan, Solomon Islands, New Caledonia, Central Pacific Standard Time
             New Zealand Standard Time, (GMT + 12: 00) Auckland, Wellington, New Zealand Standard Time
             Fiji Standard Time, (GMT + 12: 00) Fiji, Kamchatka, Marshall Islands, Fiji Standard Time
             Tonga Standard Time, (GMT + 13: 00) Nuku'alofa, Tonga Standard Time
    */
    

      

  • 相关阅读:
    Eclipse插件安装方法大全
    Weblogic web应用中获取文件的绝对路径
    Weblogic 设置优先引用web项目的jar包
    Oracle 数据库创建(图形界面操作)
    Java 输入输出流总结
    如何获取项目中文件的路径
    EclEmma安装与使用
    单向链表

    散列表
  • 原文地址:https://www.cnblogs.com/sylvialucy/p/14005262.html
Copyright © 2011-2022 走看看