2020年2月15日土曜日

How to get time in a particular time zone with Swift Data class.
set time zone to the DateFormatter() with identifiersecondsFromGMT, and abbreviation

let format = DateFormatter()
format.dateFormat = "yyyy-MM-dd HH:mm"

format.timeZone   = TimeZone(identifier: "Asia/Tokyo")
let timeTokyo =  format.string(from: date)
print("Tokyo                   : \(timeTokyo)")
format.timeZone = TimeZone(identifier: "Europe/Vatican")
let timeVatican = format.string(from: date)
print("Vatican                 : \(timeVatican)")

format.timeZone = TimeZone(secondsFromGMT: 32400)
print("Tokyo FromGMT           : \(format.string(from: date))")
format.timeZone = TimeZone(secondsFromGMT: 3600)
print("Vatican FromGMT         : \(format.string(from: date))")

format.timeZone = TimeZone(abbreviation: "GMT+9")
print("Tokyo fromAbbreviation  : \(format.string(from: date))")
format.timeZone = TimeZone(abbreviation: "GMT+1")
print("Vatican FromAbbreviation: \(format.string(from: date))")

Tokyo                   : 2020-02-16 01:18
Vatican                 : 2020-02-15 17:18
Tokyo FromGMT           : 2020-02-16 01:18
Vatican FromGMT         : 2020-02-15 17:18
Tokyo fromAbbreviation  : 2020-02-16 01:18
Vatican FromAbbreviation: 2020-02-15 17:18

Swift Timezone list
TimeZone: Africa/Abidjan Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Accra Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Addis_Ababa Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Algiers Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Asmara Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Bamako Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Bangui Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Banjul Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Bissau Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Blantyre Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Brazzaville Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Bujumbura Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Cairo Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Casablanca Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Ceuta Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Conakry Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Dakar Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Dar_es_Salaam Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Djibouti Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Douala Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/El_Aaiun Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Freetown Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Gaborone Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Harare Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Johannesburg Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Juba Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Kampala Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Khartoum Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Kigali Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Kinshasa Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Lagos Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Libreville Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Lome Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Luanda Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Lubumbashi Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Lusaka Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Malabo Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Maputo Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Maseru Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Mbabane Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Mogadishu Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Monrovia Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Nairobi Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Africa/Ndjamena Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Niamey Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Nouakchott Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Ouagadougou Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Porto-Novo Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Sao_Tome Abbreviation: GMT secondsFromGMT: 0

TimeZone: Africa/Tripoli Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Africa/Tunis Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Africa/Windhoek Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: America/Adak Abbreviation: HAST secondsFromGMT: -36000

TimeZone: America/Anchorage Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/Anguilla Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Antigua Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Araguaina Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Buenos_Aires Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Catamarca Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Cordoba Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Jujuy Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/La_Rioja Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Mendoza Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Rio_Gallegos Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Salta Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/San_Juan Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/San_Luis Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Tucuman Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Argentina/Ushuaia Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Aruba Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Asuncion Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Atikokan Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Bahia Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Bahia_Banderas Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Barbados Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Belem Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Belize Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Blanc-Sablon Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Boa_Vista Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Bogota Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Boise Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Cambridge_Bay Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Campo_Grande Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Cancun Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Caracas Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Cayenne Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Cayman Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Chicago Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Chihuahua Abbreviation: GMT-7 secondsFromGMT: -25200

TimeZone: America/Costa_Rica Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Creston Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Cuiaba Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Curacao Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Danmarkshavn Abbreviation: GMT secondsFromGMT: 0

TimeZone: America/Dawson Abbreviation: PST secondsFromGMT: -28800

TimeZone: America/Dawson_Creek Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Denver Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Detroit Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Dominica Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Edmonton Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Eirunepe Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/El_Salvador Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Fort_Nelson Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Fortaleza Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Glace_Bay Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Godthab Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Goose_Bay Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Grand_Turk Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Grenada Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Guadeloupe Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Guatemala Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Guayaquil Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Guyana Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Halifax Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Havana Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Hermosillo Abbreviation: GMT-7 secondsFromGMT: -25200

TimeZone: America/Indiana/Indianapolis Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Indiana/Knox Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Indiana/Marengo Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Indiana/Petersburg Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Indiana/Tell_City Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Indiana/Vevay Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Indiana/Vincennes Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Indiana/Winamac Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Inuvik Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Iqaluit Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Jamaica Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Juneau Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/Kentucky/Louisville Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Kentucky/Monticello Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Kralendijk Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/La_Paz Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Lima Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Los_Angeles Abbreviation: PST secondsFromGMT: -28800

TimeZone: America/Lower_Princes Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Maceio Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Managua Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Manaus Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Marigot Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Martinique Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Matamoros Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Mazatlan Abbreviation: GMT-7 secondsFromGMT: -25200

TimeZone: America/Menominee Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Merida Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Metlakatla Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/Mexico_City Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Miquelon Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Moncton Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Monterrey Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Montevideo Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Montreal Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Montserrat Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Nassau Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/New_York Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Nipigon Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Nome Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/Noronha Abbreviation: GMT-2 secondsFromGMT: -7200

TimeZone: America/North_Dakota/Beulah Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/North_Dakota/Center Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/North_Dakota/New_Salem Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Ojinaga Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Panama Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Pangnirtung Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Paramaribo Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Phoenix Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Port-au-Prince Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Port_of_Spain Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Porto_Velho Abbreviation: GMT-4 secondsFromGMT: -14400

TimeZone: America/Puerto_Rico Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Punta_Arenas Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Rainy_River Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Rankin_Inlet Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Recife Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Regina Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Resolute Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Rio_Branco Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: America/Santa_Isabel Abbreviation: GMT-8 secondsFromGMT: -28800

TimeZone: America/Santarem Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Santiago Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Santo_Domingo Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Sao_Paulo Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: America/Scoresbysund Abbreviation: GMT-1 secondsFromGMT: -3600

TimeZone: America/Shiprock Abbreviation: MST secondsFromGMT: -25200

TimeZone: America/Sitka Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/St_Barthelemy Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/St_Johns Abbreviation: GMT-3:30 secondsFromGMT: -12600

TimeZone: America/St_Kitts Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/St_Lucia Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/St_Thomas Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/St_Vincent Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Swift_Current Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Tegucigalpa Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Thule Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Thunder_Bay Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Tijuana Abbreviation: PST secondsFromGMT: -28800

TimeZone: America/Toronto Abbreviation: EST secondsFromGMT: -18000

TimeZone: America/Tortola Abbreviation: AST secondsFromGMT: -14400

TimeZone: America/Vancouver Abbreviation: PST secondsFromGMT: -28800

TimeZone: America/Whitehorse Abbreviation: PST secondsFromGMT: -28800

TimeZone: America/Winnipeg Abbreviation: CST secondsFromGMT: -21600

TimeZone: America/Yakutat Abbreviation: AKST secondsFromGMT: -32400

TimeZone: America/Yellowknife Abbreviation: MST secondsFromGMT: -25200

TimeZone: Antarctica/Casey Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Antarctica/Davis Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Antarctica/DumontDUrville Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Antarctica/Macquarie Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Antarctica/Mawson Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Antarctica/McMurdo Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Antarctica/Palmer Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: Antarctica/Rothera Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: Antarctica/South_Pole Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Antarctica/Syowa Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Antarctica/Troll Abbreviation: GMT secondsFromGMT: 0

TimeZone: Antarctica/Vostok Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Arctic/Longyearbyen Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Asia/Aden Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Almaty Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Amman Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Anadyr Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Asia/Aqtau Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Aqtobe Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Ashgabat Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Atyrau Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Baghdad Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Bahrain Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Baku Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Asia/Bangkok Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Barnaul Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Beirut Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Bishkek Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Brunei Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Calcutta Abbreviation: GMT+5:30 secondsFromGMT: 19800

TimeZone: Asia/Chita Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Choibalsan Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Chongqing Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Colombo Abbreviation: GMT+5:30 secondsFromGMT: 19800

TimeZone: Asia/Damascus Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Dhaka Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Dili Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Dubai Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Asia/Dushanbe Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Famagusta Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Gaza Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Harbin Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Hebron Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Ho_Chi_Minh Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Hong_Kong Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Hovd Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Irkutsk Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Jakarta Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Jayapura Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Jerusalem Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Kabul Abbreviation: GMT+4:30 secondsFromGMT: 16200

TimeZone: Asia/Kamchatka Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Asia/Karachi Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Kashgar Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Kathmandu Abbreviation: GMT+5:45 secondsFromGMT: 20700

TimeZone: Asia/Katmandu Abbreviation: GMT+5:45 secondsFromGMT: 20700

TimeZone: Asia/Khandyga Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Krasnoyarsk Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Kuala_Lumpur Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Kuching Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Kuwait Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Macau Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Magadan Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Asia/Makassar Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Manila Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Muscat Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Asia/Nicosia Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Asia/Novokuznetsk Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Novosibirsk Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Omsk Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Oral Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Phnom_Penh Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Pontianak Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Pyongyang Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Qatar Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Qostanay Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Qyzylorda Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Rangoon Abbreviation: GMT+6:30 secondsFromGMT: 23400

TimeZone: Asia/Riyadh Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Asia/Sakhalin Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Asia/Samarkand Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Seoul Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Shanghai Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Singapore Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Srednekolymsk Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Asia/Taipei Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Tashkent Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Tbilisi Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Asia/Tehran Abbreviation: GMT+3:30 secondsFromGMT: 12600

TimeZone: Asia/Thimphu Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Tokyo Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Tomsk Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Ulaanbaatar Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Asia/Urumqi Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Asia/Ust-Nera Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Asia/Vientiane Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Asia/Vladivostok Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Asia/Yakutsk Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Asia/Yangon Abbreviation: GMT+6:30 secondsFromGMT: 23400

TimeZone: Asia/Yekaterinburg Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Asia/Yerevan Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Atlantic/Azores Abbreviation: GMT-1 secondsFromGMT: -3600

TimeZone: Atlantic/Bermuda Abbreviation: AST secondsFromGMT: -14400

TimeZone: Atlantic/Canary Abbreviation: GMT secondsFromGMT: 0

TimeZone: Atlantic/Cape_Verde Abbreviation: GMT-1 secondsFromGMT: -3600

TimeZone: Atlantic/Faroe Abbreviation: GMT secondsFromGMT: 0

TimeZone: Atlantic/Madeira Abbreviation: GMT secondsFromGMT: 0

TimeZone: Atlantic/Reykjavik Abbreviation: GMT secondsFromGMT: 0

TimeZone: Atlantic/South_Georgia Abbreviation: GMT-2 secondsFromGMT: -7200

TimeZone: Atlantic/St_Helena Abbreviation: GMT secondsFromGMT: 0

TimeZone: Atlantic/Stanley Abbreviation: GMT-3 secondsFromGMT: -10800

TimeZone: Australia/Adelaide Abbreviation: GMT+10:30 secondsFromGMT: 37800

TimeZone: Australia/Brisbane Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Australia/Broken_Hill Abbreviation: GMT+10:30 secondsFromGMT: 37800

TimeZone: Australia/Currie Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Australia/Darwin Abbreviation: GMT+9:30 secondsFromGMT: 34200

TimeZone: Australia/Eucla Abbreviation: GMT+8:45 secondsFromGMT: 31500

TimeZone: Australia/Hobart Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Australia/Lindeman Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Australia/Lord_Howe Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Australia/Melbourne Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Australia/Perth Abbreviation: GMT+8 secondsFromGMT: 28800

TimeZone: Australia/Sydney Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Europe/Amsterdam Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Andorra Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Astrakhan Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Europe/Athens Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Belgrade Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Berlin Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Bratislava Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Brussels Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Bucharest Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Budapest Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Busingen Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Chisinau Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Copenhagen Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Dublin Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Gibraltar Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Guernsey Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Helsinki Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Isle_of_Man Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Istanbul Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Europe/Jersey Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Kaliningrad Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Kiev Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Kirov Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Europe/Lisbon Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Ljubljana Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/London Abbreviation: GMT secondsFromGMT: 0

TimeZone: Europe/Luxembourg Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Madrid Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Malta Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Mariehamn Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Minsk Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Europe/Monaco Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Moscow Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Europe/Oslo Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Paris Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Podgorica Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Prague Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Riga Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Rome Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Samara Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Europe/San_Marino Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Sarajevo Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Saratov Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Europe/Simferopol Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Europe/Skopje Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Sofia Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Stockholm Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Tallinn Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Tirane Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Ulyanovsk Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Europe/Uzhgorod Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Vaduz Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Vatican Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Vienna Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Vilnius Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Volgograd Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Europe/Warsaw Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Zagreb Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: Europe/Zaporozhye Abbreviation: GMT+2 secondsFromGMT: 7200

TimeZone: Europe/Zurich Abbreviation: GMT+1 secondsFromGMT: 3600

TimeZone: GMT Abbreviation: GMT secondsFromGMT: 0

TimeZone: Indian/Antananarivo Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Indian/Chagos Abbreviation: GMT+6 secondsFromGMT: 21600

TimeZone: Indian/Christmas Abbreviation: GMT+7 secondsFromGMT: 25200

TimeZone: Indian/Cocos Abbreviation: GMT+6:30 secondsFromGMT: 23400

TimeZone: Indian/Comoro Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Indian/Kerguelen Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Indian/Mahe Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Indian/Maldives Abbreviation: GMT+5 secondsFromGMT: 18000

TimeZone: Indian/Mauritius Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Indian/Mayotte Abbreviation: GMT+3 secondsFromGMT: 10800

TimeZone: Indian/Reunion Abbreviation: GMT+4 secondsFromGMT: 14400

TimeZone: Pacific/Apia Abbreviation: GMT+14 secondsFromGMT: 50400

TimeZone: Pacific/Auckland Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Pacific/Bougainville Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Chatham Abbreviation: GMT+13:45 secondsFromGMT: 49500

TimeZone: Pacific/Chuuk Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Pacific/Easter Abbreviation: GMT-5 secondsFromGMT: -18000

TimeZone: Pacific/Efate Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Enderbury Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Pacific/Fakaofo Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Pacific/Fiji Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Funafuti Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Galapagos Abbreviation: GMT-6 secondsFromGMT: -21600

TimeZone: Pacific/Gambier Abbreviation: GMT-9 secondsFromGMT: -32400

TimeZone: Pacific/Guadalcanal Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Guam Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Pacific/Honolulu Abbreviation: HST secondsFromGMT: -36000

TimeZone: Pacific/Johnston Abbreviation: HAST secondsFromGMT: -36000

TimeZone: Pacific/Kiritimati Abbreviation: GMT+14 secondsFromGMT: 50400

TimeZone: Pacific/Kosrae Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Kwajalein Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Majuro Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Marquesas Abbreviation: GMT-9:30 secondsFromGMT: -34200

TimeZone: Pacific/Midway Abbreviation: GMT-11 secondsFromGMT: -39600

TimeZone: Pacific/Nauru Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Niue Abbreviation: GMT-11 secondsFromGMT: -39600

TimeZone: Pacific/Norfolk Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Noumea Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Pago_Pago Abbreviation: GMT-11 secondsFromGMT: -39600

TimeZone: Pacific/Palau Abbreviation: GMT+9 secondsFromGMT: 32400

TimeZone: Pacific/Pitcairn Abbreviation: GMT-8 secondsFromGMT: -28800

TimeZone: Pacific/Pohnpei Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Ponape Abbreviation: GMT+11 secondsFromGMT: 39600

TimeZone: Pacific/Port_Moresby Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Pacific/Rarotonga Abbreviation: GMT-10 secondsFromGMT: -36000

TimeZone: Pacific/Saipan Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Pacific/Tahiti Abbreviation: GMT-10 secondsFromGMT: -36000

TimeZone: Pacific/Tarawa Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Tongatapu Abbreviation: GMT+13 secondsFromGMT: 46800

TimeZone: Pacific/Truk Abbreviation: GMT+10 secondsFromGMT: 36000

TimeZone: Pacific/Wake Abbreviation: GMT+12 secondsFromGMT: 43200

TimeZone: Pacific/Wallis Abbreviation: GMT+12 secondsFromGMT: 43200

 How to get the list
run the below code

for tz in TimeZone.knownTimeZoneIdentifiers {
    let timeZone = TimeZone(identifier: tz)
    if let abbreviation = timeZone?.abbreviation(), let seconds = timeZone?.secondsFromGMT() {
        print ("TimeZone: \(tz) Abbreviation: \(abbreviation) secondsFromGMT: \(seconds)\n")
    }
}

0 件のコメント:

コメントを投稿