Module:Timezones

-- Credit: User:Joritochip -- NOTE: This is NOT meant to be used by other lua modules, just.

local p = {}

p.timezones = { {"BIT", "Baker Island", "-12"}, {"IDLW", "International Day Line West", "-12"}, {"NUT", "Niue", "-11"}, {"SST", "Samoa Standard", "-11"}, {"CKT", "Cook Island", "-10"}, {"HST", "Hawaii–Aleutian Standard", "-10"}, {"SDT", "Samoa Daylight", "-10"}, {"TAHT", "Tahiti", "-10"}, {"MART", "Marquesas Islands", "-9.5"}, {"MIT", "Marquesas Islands", "-9.5"}, {"AKST", "Alaska Standard", "-9"}, {"GAMT", "Gambier Islands", "-9"}, {"GIT", "Gambier Island", "-9"}, {"HDT", "Hawaii–Aleutian Daylight", "-9"}, {"AKDT", "Alaska Daylight", "-8"}, {"CIST", "Clipperton Island Standard", "-8"}, {"PST", "Pacific Standard", "-8"}, {"MST", "Mountain Standard", "-7"}, {"PDT", "Pacific Daylight", "-7"}, {"CST", "Central Standard", "-6"}, {"EAST", "Easter Island Standard", "-6"}, {"GALT", "Galápagos", "-6"}, {"MDT", "Mountain Daylight", "-6"}, {"ACT", "Acre", "-5"}, {"CDT", "Central Daylight", "-5"}, {"COT", "Colombia", "-5"}, {"CST", "Cuba Standard", "-5"}, {"EASST", "Easter Island Summer", "-5"}, {"ECT", "Ecuador", "-5"}, {"EST", "Eastern Standard", "-5"}, {"PET", "Peru", "-5"}, {"AMT", "Amazon (Brazil)", "-4"}, {"AST", "Atlantic Standard", "-4"}, {"BOT", "Bolivia", "-4"}, {"CDT", "Cuba Daylight", "-4"}, {"CLT", "Chile Standard", "-4"}, {"COST", "Colombia Summer", "-4"}, {"ECT", "Eastern Caribbean", "-4"}, {"EDT", "Eastern Daylight", "-4"}, {"FKT", "Falkland Islands", "-4"}, {"GYT", "Guyana", "-4"}, {"PYT", "Paraguay", "-4"}, {"VET", "Venezuelan Standard", "-4"}, {"NST", "Newfoundland Standard", "-3.5"}, {"NT", "Newfoundland", "-3.5"}, {"ADT", "Atlantic Daylight", "-3"}, {"AMST", "Amazon Summer (Brazil)", "-3"}, {"ART", "Argentina", "-3"}, {"BRT", "Brasilia", "-3"}, {"CLST", "Chile Summer", "-3"}, {"FKST", "Falkland Islands Summer", "-3"}, {"GFT", "French Guiana", "-3"}, {"PMST", "Saint Pierre and Miquelon Standard", "-3"}, {"PYST", "Paraguay Summer", "-3"}, {"ROTT", "Rothera Research Station", "-3"}, {"SRT", "Suriname", "-3"}, {"UYT", "Uruguay Standard", "-3"}, {"NDT", "Newfoundland Daylight", "-2.5"}, {"BRST", "Brasília Summer", "-2"}, {"FNT", "Fernando de Noronha", "-2"}, {"GST", "South Georgia/South Sandwich Islands", "-2"}, {"PMDT", "Saint Pierre/Miquelon Daylight", "-2"}, {"UYST", "Uruguay Summer", "-2"}, {"AZOT", "Azores Standard", "-1"}, {"CVT", "Cape Verde", "-1"}, {"EGT", "Eastern Greenland", "-1"}, {"AZOST", "Azores Summer", "+0"}, {"EGST", "Eastern Greenland Summer", "+0"}, {"GMT", "Greenwich Mean", "+0"}, {"UTC", "Coordinated Universal", "+0"}, {"WET", "Western European", "+0"}, {"LINT", "Line Islands", "+14"}, {"CHADT", "Chatham Daylight", "+13.75"}, {"NZDT", "New Zealand Daylight", "+13"}, {"PHOT", "Phoenix Island", "+13"}, {"TKT", "Tokelau", "+13"}, {"TOT", "Tonga", "+13"}, {"CHAST", "Chatham Standard", "+12.75"}, {"ANAT", "Anadyr", "+12"}, {"FJT", "Fiji", "+12"}, {"GILT", "Gilbert Island", "+12"}, {"MAGT", "Magadan", "+12"}, {"MHT", "Marshall Islands", "+12"}, {"NZST", "New Zealand Standard", "+12"}, {"PETT", "Kamchatka", "+12"}, {"TVT", "Tuvalu", "+12"}, {"WAKT", "Wake Island", "+12"}, {"AEDT", "Australian Eastern Daylight", "+11"}, {"BST", "Bougainville Standard", "+11"}, {"KOST", "Kosrae", "+11"}, {"LHST", "Lord Howe Summer", "+11"}, {"MIST", "Macquarie Island Station", "+11"}, {"NCT", "New Caledonia", "+11"}, {"NFT", "Norfolk Island", "+11"}, {"PONT", "Pohnpei Standard", "+11"}, {"SAKT", "Sakhalin Island", "+11"}, {"SBT", "Solomon Islands", "+11"}, {"SRET", "Srednekolymsk", "+11"}, {"VUT", "Vanuatu", "+11"}, {"ACDT", "Australian Central Daylight", "+10.5"}, {"LHST", "Lord Howe Standard", "+10.5"}, {"AEST", "Australian Eastern Standard", "+10"}, {"CHST", "Chamorro Standard", "+10"}, {"CHUT", "Chuuk", "+10"}, {"DDUT", "Dumont d'Urville", "+10"}, {"PGT", "Papua New Guinea", "+10"}, {"VLAT", "Vladivostok", "+10"}, {"ACST", "Australian Central Standard", "+9.5"}, {"CHOST", "Choibalsan Summer", "+9"}, {"EIT", "Eastern Indonesian", "+9"}, {"JST", "Japan Standard", "+9"}, {"KST", "Korea Standard", "+9"}, {"TLT", "Timor Leste", "+9"}, {"ULAST", "Ulaanbaatar Summer", "+9"}, {"YAKT", "Yakutsk", "+9"}, {"ACWST", "Australian Central Western Standard", "+8.75"}, {"CWST", "Central Western Standard", "+8.75"}, {"AWST", "Australian Western Standard", "+8"}, {"BDT", "Brunei", "+8"}, {"CHOT", "Choibalsan Standard", "+8"}, {"CIT", "Central Indonesia", "+8"}, {"CST", "China Standard", "+8"}, {"CT", "China", "+8"}, {"HKT", "Hong Kong", "+8"}, {"IRKT", "Irkutsk", "+8"}, {"MST", "Malaysia Standard", "+8"}, {"MYT", "Malaysia", "+8"}, {"PHT", "Philippine", "+8"}, {"PST", "Philippine Standard", "+8"}, {"SGT", "Singapore", "+8"}, {"SST", "Singapore Standard", "+8"}, {"ULAT", "Ulaanbaatar Standard", "+8"}, {"WST", "Western Standard", "+8"}, {"CXT", "Christmas Island", "+7"}, {"DAVT", "Davis", "+7"}, {"HOVT", "Hovd", "+7"}, {"ICT", "Indochina", "+7"}, {"KRAT", "Krasnoyarsk", "+7"}, {"NOVT", "Novosibirsk", "+7"}, {"THA", "Thailand Standard", "+7"}, {"WIT", "Western Indonesian", "+7"}, {"CCT", "Cocos Islands", "+6.5"}, {"MMT", "Myanmar Standard", "+6.5"}, {"ALMT", "Alma-Ata", "+6"}, {"BIOT", "British Indian Ocean", "+6"}, {"BST", "Bangladesh Standard", "+6"}, {"BTT", "Bhutan", "+6"}, {"KGT", "Kyrgyzstan", "+6"}, {"OMST", "Omsk", "+6"}, {"VOST", "Vostok Station", "+6"}, {"NPT", "Nepal", "+5.75"}, {"IST", "Indian Standard", "+5.5"}, {"SLST", "Sri Lanka Standard", "+5.5"}, {"AQTT", "Aqtobe", "+5"}, {"HMT", "Heard/McDonald Islands", "+5"}, {"MAWT", "Mawson Station", "+5"}, {"MVT", "Maldives", "+5"}, {"ORAT", "Oral", "+5"}, {"PKT", "Pakistan Standard", "+5"}, {"TFT", "French Southern/Antarctic", "+5"}, {"TJT", "Tajikistan", "+5"}, {"TMT", "Turkmenistan", "+5"}, {"UZT", "Uzbekistan", "+5"}, {"YEKT", "Yekaterinburg", "+5"}, {"AFT", "Afghanistan", "+4.5"}, {"IRDT", "Iran Daylight", "+4.5"}, {"AMT", "Armenia", "+4"}, {"AZT", "Azerbaijan", "+4"}, {"GET", "Georgia Standard", "+4"}, {"GST", "Gulf Standard", "+4"}, {"MUT", "Mauritius", "+4"}, {"RET", "Réunion", "+4"}, {"SAMT", "Samara", "+4"}, {"SCT", "Seychelles", "+4"}, {"VOLT", "Volgograd", "+4"}, {"IRST", "Iran Standard", "+3.5"}, {"AST", "Arabia Standard", "+3"}, {"EAT", "East Africa", "+3"}, {"EEST", "Eastern European Summer", "+3"}, {"FET", "Further-eastern European", "+3"}, {"IDT", "Israel Daylight", "+3"}, {"IOT", "Indian Ocean", "+3"}, {"MSK", "Moscow", "+3"}, {"SYOT", "Showa Station", "+3"}, {"TRT", "Turkey", "+3"}, {"CAT", "Central Africa", "+2"}, {"CEST", "Central European Summer", "+2"}, {"EET", "Eastern European", "+2"}, {"HAEC", "Heure Avancée d'Europe Centrale", "+2"}, {"IST", "Israel Standard", "+2"}, {"KALT", "Kaliningrad", "+2"}, {"MEST", "Middle European Summer", "+2"}, {"SAST", "South African Standard", "+2"}, {"WAST", "West Africa Summer", "+2"}, {"BST", "British Summer", "+1"}, {"CET", "Central European", "+1"}, {"IST", "Irish Standard", "+1"}, {"MET", "Middle European", "+1"}, {"WAT", "West Africa", "+1"}, {"WEST", "Western European Summer", "+1"} }

function p.find_name(frame) local abb = frame.args[1] local num = #p.timezones for i = 1, num do		entry = p.timezones[i] if string.lower(entry[1]) == string.lower(abb) then return entry[2] end end return "Coordinated Universal" end

function p.find_offset(frame) local abb = frame.args[1] local num = #p.timezones for i = 1, num do		entry = p.timezones[i] if string.lower(entry[1]) == string.lower(abb) then return entry[3] end end return 0 end

return p