amiga-ntimed/tz.h

247 lines
10 KiB
C

/*
* Copyright (c) 2015 Carsten Larsen
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
extern int tzid;
extern float utcoffset;
void ArgTimezone(const char *tz);
void PrintTimeZones();
typedef struct tzabbr {
const char *abbr;
const char *name;
float offset;
} tzabbr;
static const tzabbr tza[] = {
{"Z", "Zulu Time (Coordinated Universal Time)", 0.0},
#ifndef SMALL
{"ACDT", "Australian Central Daylight Savings Time", 10.5},
{"ACST", "Australian Central Standard Time", 9.5},
{"ACT", "ASEAN Common Time", 8},
{"ADT", "Atlantic Daylight Time", -3},
{"AEDT", "Australian Eastern Daylight Savings Time", 11},
{"AEST", "Australian Eastern Standard Time", 10},
{"AFT", "Afghanistan Time", 4.5},
{"AKDT", "Alaska Daylight Time", -8},
{"AKST", "Alaska Standard Time", -9},
{"AMST", "Armenia Summer Time", 5},
{"AMT", "Armenia Time", 4},
{"ART", "Argentina Time", -3},
{"AST", "Arabia Standard Time", 3},
{"AWDT", "Australian Western Daylight Time", 9},
{"AWST", "Australian Western Standard Time", 8},
{"AZOST", "Azores Standard Time", -1},
{"AZT", "Azerbaijan Time", 4},
{"BDT", "Brunei Time", 8},
{"BIOT", "British Indian Ocean Time", 6},
{"BIT", "Baker Island Time", -12},
{"BOT", "Bolivia Time", -4},
{"BRT", "Brasilia Time", -3},
{"BST", "Bangladesh Standard Time", 6},
{"BTT", "Bhutan Time", 6},
{"CAT", "Central Africa Time", 2},
{"CCT", "Cocos Islands Time", 6.5},
{"CDT", "Central Daylight Time (North America)", -5},
{"CEDT", "Central European Daylight Time", 2},
{"CEST", "Central European Summer Time", 2},
{"CET", "Central European Time", 1},
{"CHADT", "Chatham Daylight Time", 13.75},
{"CHAST", "Chatham Standard Time", 12.75},
{"CHOT", "Choibalsan", 8},
{"ChST", "Chamorro Standard Time", 10},
{"CHUT", "Chuuk Time", 10},
{"CIST", "Clipperton Island Standard Time", -8},
{"CIT", "Central Indonesia Time", 8},
{"CKT", "Cook Island Time", -10},
{"CLST", "Chile Summer Time", -3},
{"CLT", "Chile Standard Time", -4},
{"COST", "Colombia Summer Time", -4},
{"COT", "Colombia Time", -5},
{"CST", "Central Standard Time (North America)", -6},
{"CT", "China time", 8},
{"CVT", "Cape Verde Time", -1},
{"CXT", "Christmas Island Time", 7},
{"DAVT", "Davis Time", 7},
{"DDUT", "Dumont d'Urville Time", 10},
{"EASST", "Easter Island Standard Summer Time", -5},
{"EAST", "Easter Island Standard Time", -6},
{"EAT", "East Africa Time", 3},
{"ECT", "Ecuador Time", -5},
{"EDT", "Eastern Daylight Time (North America)", -4},
{"EEDT", "Eastern European Daylight Time", 3},
{"EEST", "Eastern European Summer Time", 3},
{"EET", "Eastern European Time", 2},
{"EGST", "Eastern Greenland Summer Time", 0},
{"EGT", "Eastern Greenland Time", -1},
{"EIT", "Eastern Indonesian Time", 9},
{"EST", "Eastern Standard Time (North America)", -5},
{"FET", "Further-eastern European Time", 3},
{"FJT", "Fiji Time", 12},
{"FKST", "Falkland Islands Standard Time", -3},
{"FKST", "Falkland Islands Summer Time", -3},
{"FKT", "Falkland Islands Time", -4},
{"FNT", "Fernando de Noronha Time", -2},
{"GALT", "Galapagos Time", -6},
{"GAMT", "Gambier Islands", -9},
{"GET", "Georgia Standard Time", 4},
{"GFT", "French Guiana Time", -3},
{"GILT", "Gilbert Island Time", 12},
{"GIT", "Gambier Island Time", -9},
{"GMT", "Greenwich Mean Time", 0},
{"GST", "South Georgia and the South Sandwich Islands", -2},
{"GST", "Gulf Standard Time", 4},
{"GYT", "Guyana Time", -4},
{"HADT", "Hawaii-Aleutian Daylight Time", -9},
{"HAEC", "Heure Avancée d'Europe Centrale francised name for CEST", 2},
{"HAST", "Hawaii-Aleutian Standard Time", -10},
{"HKT", "Hong Kong Time", 8},
{"HMT", "Heard and McDonald Islands Time", 5},
{"HOVT", "Khovd Time", 7},
{"HST", "Hawaii Standard Time", -10},
{"ICT", "Indochina Time", 7},
{"IDT", "Israel Daylight Time", 3},
{"IOT", "Indian Ocean Time", 3},
{"IRDT", "Iran Daylight Time", 4.5},
{"IRKT", "Irkutsk Time", 8},
{"IRST", "Iran Standard Time", 3.5},
{"IST", "Indian Standard Time", 5.5},
{"JST", "Japan Standard Time", 9},
{"KGT", "Kyrgyzstan time", 6},
{"KOST", "Kosrae Time", 11},
{"KRAT", "Krasnoyarsk Time", 7},
{"KST", "Korea Standard Time", 9},
{"LHST", "Lord Howe Standard Time", 10.5},
{"LINT", "Line Islands Time", 14},
{"MAGT", "Magadan Time", 12},
{"MART", "Marquesas Islands Time", -8.5},
{"MAWT", "Mawson Station Time", 5},
{"MDT", "Mountain Daylight Time (North America)", -6},
{"MET", "Middle European Time Same zone as CET", 1},
{"MEST", "Middle European Saving Time Same zone as CEST", 2},
{"MHT", "Marshall Islands", 12},
{"MIST", "Macquarie Island Station Time", 11},
{"MIT", "Marquesas Islands Time", -8.5},
{"MMT", "Myanmar Time", 6.5},
{"MSK", "Moscow Time", 3},
{"MST", "Myanmar Standard Time", 6.5},
{"MUT", "Mauritius Time", 4},
{"MVT", "Maldives Time", 5},
{"MYT", "Malaysia Time", 8},
{"NCT", "New Caledonia Time", 11},
{"NDT", "Newfoundland Daylight Time", -1.5},
{"NFT", "Norfolk Time", 11.5},
{"NPT", "Nepal Time", 5.75},
{"NST", "Newfoundland Standard Time", -2.5},
{"NT", "Newfoundland Time", -2.5},
{"NUT", "Niue Time", -11},
{"NZDT", "New Zealand Daylight Time", 13},
{"NZST", "New Zealand Standard Time", 12},
{"OMST", "Omsk Time", 6},
{"ORAT", "Oral Time", 5},
{"PDT", "Pacific Daylight Time (North America)", -7},
{"PET", "Peru Time", -5},
{"PETT", "Kamchatka Time", 12},
{"PGT", "Papua New Guinea Time", 10},
{"PHOT", "Phoenix Island Time", 13},
{"PKT", "Pakistan Standard Time", 5},
{"PMDT", "Saint Pierre and Miquelon Daylight time", -2},
{"PMST", "Saint Pierre and Miquelon Standard Time", -3},
{"PONT", "Pohnpei Standard Time", 11},
{"PST", "Pacific Standard Time (North America)", -8},
{"PYST", "Paraguay Summer Time (South America)", -3},
{"PYT", "Paraguay Time (South America)", -4},
{"RET", "Réunion Time", 4},
{"ROTT", "Rothera Research Station Time", -3},
{"SAKT", "Sakhalin Island time", 11},
{"SAMT", "Samara Time", 4},
{"SAST", "South African Standard Time", 2},
{"SBT", "Solomon Islands Time", 11},
{"SCT", "Seychelles Time", 4},
{"SGT", "Singapore Time", 8},
{"SLST", "Sri Lanka Time", 5.5},
{"SRET", "Srednekolymsk Time", 11},
{"SRT", "Suriname Time", -3},
{"SST", "Samoa Standard Time", -11},
{"SYOT", "Showa Station Time", 3},
{"TAHT", "Tahiti Time", -10},
{"THA", "Thailand Standard Time", 7},
{"TFT", "Indian/Kerguelen", 5},
{"TJT", "Tajikistan Time", 5},
{"TKT", "Tokelau Time", 13},
{"TLT", "Timor Leste Time", 9},
{"TMT", "Turkmenistan Time", 5},
{"TOT", "Tonga Time", 13},
{"TVT", "Tuvalu Time", 12},
{"UCT", "Coordinated Universal Time", 0},
{"ULAT", "Ulaanbaatar Time", 8},
{"USZ1", "Kaliningrad Time", 2},
{"UTC", "Coordinated Universal Time", 0},
{"UYST", "Uruguay Summer Time", -2},
{"UYT", "Uruguay Standard Time", -3},
{"UZT", "Uzbekistan Time", 5},
{"VET", "Venezuelan Standard Time", -3.5},
{"VLAT", "Vladivostok Time", 10},
{"VOLT", "Volgograd Time", 4},
{"VOST", "Vostok Station Time", 6},
{"VUT", "Vanuatu Time", 11},
{"WAKT", "Wake Island Time", 12},
{"WAST", "West Africa Summer Time", 2},
{"WAT", "West Africa Time", 1},
{"WEDT", "Western European Daylight Time", 1},
{"WEST", "Western European Summer Time", 1},
{"WET", "Western European Time", 0},
{"WIT", "Western Indonesian Time", 7},
{"WST", "Western Standard Time", 8},
{"YAKT", "Yakutsk Time", 9},
{"YEKT", "Yekaterinburg Time", 5},
#endif
{"+1", "Coordinated Universal Time +1", 1.0},
{"+2", "Coordinated Universal Time +2", 2.0},
{"+3", "Coordinated Universal Time +3", 3.0},
{"+4", "Coordinated Universal Time +4", 4.0},
{"+5", "Coordinated Universal Time +5", 5.0},
{"+6", "Coordinated Universal Time +6", 6.0},
{"+7", "Coordinated Universal Time +7", 7.0},
{"+8", "Coordinated Universal Time +8", 8.0},
{"+9", "Coordinated Universal Time +9", 9.0},
{"+10", "Coordinated Universal Time +10", 10.0},
{"+11", "Coordinated Universal Time +11", 11.0},
{"+12", "Coordinated Universal Time +12", 12.0},
{"-1", "Coordinated Universal Time -1", -1.0},
{"-2", "Coordinated Universal Time -2", -2.0},
{"-3", "Coordinated Universal Time -3", -3.0},
{"-4", "Coordinated Universal Time -4", -4.0},
{"-5", "Coordinated Universal Time -5", -5.0},
{"-6", "Coordinated Universal Time -6", -6.0},
{"-7", "Coordinated Universal Time -7", -7.0},
{"-8", "Coordinated Universal Time -8", -8.0},
{"-9", "Coordinated Universal Time -9", -9.0},
{"-10", "Coordinated Universal Time -10", -10.0},
{"-11", "Coordinated Universal Time -11", -11.0},
{"-12", "Coordinated Universal Time -12", -12.0}
};