TimeZone
From ThorxWiki
(Difference between revisions)
m (2 revision(s)) |
|||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | +0200 CEST Europe/Andorra |
+ | Because people keep thinking that the "EST" in my `date` command must be incorrect... |
− | +0400 GST Asia/Dubai |
+ | |
− | +0430 AFT Asia/Kabul |
+ | #!/bin/bash |
− | -0400 AST America/Antigua |
+ | function dotz () { |
− | -0400 AST America/Anguilla |
+ | while read i ; do |
− | +0200 CEST Europe/Tirane |
+ | export TZ=$(echo $i | awk -F' ' '{print $3}') |
− | +0500 AMST Asia/Yerevan |
+ | OFFSET=$(date +%z) |
− | -0400 AST America/Curacao |
+ | TLA=$(date +%Z) |
− | +0100 WAT Africa/Luanda |
+ | echo -e "$OFFSET\t$TLA\t$TZ" >> foo |
− | +1200 NZST Antarctica/McMurdo |
+ | done |
− | +1200 NZST Antarctica/South_Pole |
+ | } |
− | -0400 CLT Antarctica/Palmer |
+ | grep -v "^#" /usr/share/zoneinfo/zone.tab > tz.list |
− | +0600 MAWT Antarctica/Mawson |
+ | dotz < tz.list |
− | +0700 DAVT Antarctica/Davis |
+ | sort -k2 foo > timezones |
− | +0800 WST Antarctica/Casey |
+ | |
− | +0600 VOST Antarctica/Vostok |
+ | See results at http://www.cheeky.house.cx/~nemo/extras/timezones |
− | +1000 DDUT Antarctica/DumontDUrville |
+ | |
− | +0300 SYOT Antarctica/Syowa |
+ | First columns is time offset, third column is the $TZ environment variable. The Second column is the time zone identifier, '''incorrectly assumed by most people to be unique'''. I can't find an RFC on it though :( |
− | -0300 ART America/Buenos_Aires |
||
− | -0300 ART America/Rosario |
||
− | -0300 ART America/Cordoba |
||
− | -0300 ART America/Jujuy |
||
− | -0300 ART America/Catamarca |
||
− | -0300 ART America/Mendoza |
||
− | -1100 SST Pacific/Pago_Pago |
||
− | +0200 CEST Europe/Vienna |
||
− | +1030 LHST Australia/Lord_Howe |
||
− | +1000 EST Australia/Hobart |
||
− | +1000 EST Australia/Melbourne |
||
− | +1000 EST Australia/Sydney |
||
− | +0930 CST Australia/Broken_Hill |
||
− | +1000 EST Australia/Brisbane |
||
− | +1000 EST Australia/Lindeman |
||
− | +0930 CST Australia/Adelaide |
||
− | +0930 CST Australia/Darwin |
||
− | +0800 WST Australia/Perth |
||
− | -0400 AST America/Aruba |
||
− | +0500 AZST Asia/Baku |
||
− | +0200 CEST Europe/Sarajevo |
||
− | -0400 AST America/Barbados |
||
− | +0600 BDT Asia/Dhaka |
||
− | +0200 CEST Europe/Brussels |
||
− | +0000 GMT Africa/Ouagadougou |
||
− | +0300 EEST Europe/Sofia |
||
− | +0300 AST Asia/Bahrain |
||
− | +0200 CAT Africa/Bujumbura |
||
− | +0100 WAT Africa/Porto-Novo |
||
− | -0300 ADT Atlantic/Bermuda |
||
− | +0800 BNT Asia/Brunei |
||
− | -0400 BOT America/La_Paz |
||
− | -0200 FNT America/Noronha |
||
− | -0300 BRT America/Belem |
||
− | -0300 BRT America/Fortaleza |
||
− | -0300 BRT America/Recife |
||
− | -0300 BRT America/Araguaina |
||
− | -0300 BRT America/Maceio |
||
− | -0300 BRT America/Sao_Paulo |
||
− | -0400 AMT America/Cuiaba |
||
− | -0400 AMT America/Porto_Velho |
||
− | -0400 AMT America/Boa_Vista |
||
− | -0400 AMT America/Manaus |
||
− | -0500 ACT America/Eirunepe |
||
− | -0500 ACT America/Rio_Branco |
||
− | -0400 EDT America/Nassau |
||
− | +0600 BTT Asia/Thimphu |
||
− | +0200 CAT Africa/Gaborone |
||
− | +0300 EEST Europe/Minsk |
||
− | -0600 CST America/Belize |
||
− | -0230 NDT America/St_Johns |
||
− | -0300 ADT America/Halifax |
||
− | -0300 ADT America/Glace_Bay |
||
− | -0300 ADT America/Goose_Bay |
||
− | -0400 EDT America/Montreal |
||
− | -0400 EDT America/Nipigon |
||
− | -0400 EDT America/Thunder_Bay |
||
− | -0400 EDT America/Pangnirtung |
||
− | -0400 EDT America/Iqaluit |
||
− | -0500 CDT America/Rankin_Inlet |
||
− | -0500 CDT America/Winnipeg |
||
− | -0500 CDT America/Rainy_River |
||
− | -0600 MDT America/Cambridge_Bay |
||
− | -0600 CST America/Regina |
||
− | -0600 CST America/Swift_Current |
||
− | -0600 MDT America/Edmonton |
||
− | -0600 MDT America/Yellowknife |
||
− | -0600 MDT America/Inuvik |
||
− | -0700 MST America/Dawson_Creek |
||
− | -0700 PDT America/Vancouver |
||
− | -0700 PDT America/Whitehorse |
||
− | -0700 PDT America/Dawson |
||
− | +0630 CCT Indian/Cocos |
||
− | +0100 WAT Africa/Kinshasa |
||
− | +0200 CAT Africa/Lubumbashi |
||
− | +0100 WAT Africa/Bangui |
||
− | +0100 WAT Africa/Brazzaville |
||
− | +0200 CEST Europe/Zurich |
||
− | +0000 GMT Africa/Abidjan |
||
− | -1000 CKT Pacific/Rarotonga |
||
− | -0400 CLT America/Santiago |
||
− | -0600 EAST Pacific/Easter |
||
− | +0100 WAT Africa/Douala |
||
− | +0800 CST Asia/Shanghai |
||
− | +0800 CST Asia/Harbin |
||
− | +0800 CST Asia/Chongqing |
||
− | +0800 CST Asia/Urumqi |
||
− | +0800 CST Asia/Kashgar |
||
− | -0500 COT America/Bogota |
||
− | -0600 CST America/Costa_Rica |
||
− | -0400 CDT America/Havana |
||
− | -0100 CVT Atlantic/Cape_Verde |
||
− | +0700 CXT Indian/Christmas |
||
− | +0300 EEST Asia/Nicosia |
||
− | +0200 CEST Europe/Prague |
||
− | +0200 CEST Europe/Berlin |
||
− | +0300 EAT Africa/Djibouti |
||
− | +0200 CEST Europe/Copenhagen |
||
− | -0400 AST America/Dominica |
||
− | -0400 AST America/Santo_Domingo |
||
− | +0100 CET Africa/Algiers |
||
− | -0500 ECT America/Guayaquil |
||
− | -0600 GALT Pacific/Galapagos |
||
− | +0200 EET Europe/Tallinn |
||
− | +0300 EEST Africa/Cairo |
||
− | +0000 WET Africa/El_Aaiun |
||
− | +0300 EAT Africa/Asmera |
||
− | +0200 CEST Europe/Madrid |
||
− | +0200 CEST Africa/Ceuta |
||
− | +0100 WEST Atlantic/Canary |
||
− | +0300 EAT Africa/Addis_Ababa |
||
− | +0300 EEST Europe/Helsinki |
||
− | +1200 FJT Pacific/Fiji |
||
− | -0400 FKT Atlantic/Stanley |
||
− | +1000 YAPT Pacific/Yap |
||
− | +1000 TRUT Pacific/Truk |
||
− | +1100 PONT Pacific/Ponape |
||
− | +1100 KOST Pacific/Kosrae |
||
− | +0100 WEST Atlantic/Faeroe |
||
− | +0200 CEST Europe/Paris |
||
− | +0100 WAT Africa/Libreville |
||
− | +0100 BST Europe/London |
||
− | +0100 BST Europe/Belfast |
||
− | -0400 AST America/Grenada |
||
− | +0500 GEST Asia/Tbilisi |
||
− | -0300 GFT America/Cayenne |
||
− | +0000 GMT Africa/Accra |
||
− | +0200 CEST Europe/Gibraltar |
||
− | -0200 WGST America/Godthab |
||
− | +0000 GMT America/Danmarkshavn |
||
− | +0000 EGST America/Scoresbysund |
||
− | -0400 AST America/Thule |
||
− | +0000 GMT Africa/Banjul |
||
− | +0000 GMT Africa/Conakry |
||
− | -0400 AST America/Guadeloupe |
||
− | +0100 WAT Africa/Malabo |
||
− | +0300 EEST Europe/Athens |
||
− | -0200 GST Atlantic/South_Georgia |
||
− | -0600 CST America/Guatemala |
||
− | +1000 ChST Pacific/Guam |
||
− | +0000 GMT Africa/Bissau |
||
− | -0400 GYT America/Guyana |
||
− | +0800 HKT Asia/Hong_Kong |
||
− | -0600 CST America/Tegucigalpa |
||
− | +0200 CEST Europe/Zagreb |
||
− | -0500 EST America/Port-au-Prince |
||
− | +0200 CEST Europe/Budapest |
||
− | +0700 WIT Asia/Jakarta |
||
− | +0700 WIT Asia/Pontianak |
||
− | +0800 CIT Asia/Ujung_Pandang |
||
− | +0900 EIT Asia/Jayapura |
||
− | +0100 IST Europe/Dublin |
||
− | +0300 IDT Asia/Jerusalem |
||
− | +0530 IST Asia/Calcutta |
||
− | +0600 IOT Indian/Chagos |
||
− | +0400 ADT Asia/Baghdad |
||
− | +0430 IRST Asia/Tehran |
||
− | +0000 GMT Atlantic/Reykjavik |
||
− | +0200 CEST Europe/Rome |
||
− | -0500 EST America/Jamaica |
||
− | +0300 EEST Asia/Amman |
||
− | +0900 JST Asia/Tokyo |
||
− | +0300 EAT Africa/Nairobi |
||
− | +0600 KGST Asia/Bishkek |
||
− | +0700 ICT Asia/Phnom_Penh |
||
− | +1200 GILT Pacific/Tarawa |
||
− | +1300 PHOT Pacific/Enderbury |
||
− | +1400 LINT Pacific/Kiritimati |
||
− | +0300 EAT Indian/Comoro |
||
− | -0400 AST America/St_Kitts |
||
− | +0900 KST Asia/Pyongyang |
||
− | +0900 KST Asia/Seoul |
||
− | +0300 AST Asia/Kuwait |
||
− | -0500 EST America/Cayman |
||
− | +0700 ALMST Asia/Almaty |
||
− | +0600 AQTST Asia/Aqtobe |
||
− | +0500 AQTST Asia/Aqtau |
||
− | +0700 ICT Asia/Vientiane |
||
− | +0300 EEST Asia/Beirut |
||
− | -0400 AST America/St_Lucia |
||
− | +0200 CEST Europe/Vaduz |
||
− | +0600 LKT Asia/Colombo |
||
− | +0000 GMT Africa/Monrovia |
||
− | +0200 SAST Africa/Maseru |
||
− | +0200 EET Europe/Vilnius |
||
− | +0200 CEST Europe/Luxembourg |
||
− | +0300 EEST Europe/Riga |
||
− | +0200 EET Africa/Tripoli |
||
− | +0000 WET Africa/Casablanca |
||
− | +0200 CEST Europe/Monaco |
||
− | +0300 EEST Europe/Chisinau |
||
− | +0300 EAT Indian/Antananarivo |
||
− | +1200 MHT Pacific/Majuro |
||
− | +1200 MHT Pacific/Kwajalein |
||
− | +0200 CEST Europe/Skopje |
||
− | +0000 GMT Africa/Bamako |
||
− | +0000 GMT Africa/Timbuktu |
||
− | +0630 MMT Asia/Rangoon |
||
− | +0800 ULAT Asia/Ulaanbaatar |
||
− | +0700 HOVT Asia/Hovd |
||
− | +0900 CHOT Asia/Choibalsan |
||
− | +0800 CST Asia/Macao |
||
− | +1000 ChST Pacific/Saipan |
||
− | -0400 AST America/Martinique |
||
− | +0000 GMT Africa/Nouakchott |
||
− | -0400 AST America/Montserrat |
||
− | +0200 CEST Europe/Malta |
||
− | +0400 MUT Indian/Mauritius |
||
− | +0500 MVT Indian/Maldives |
||
− | +0200 CAT Africa/Blantyre |
||
− | -0600 CST America/Mexico_City |
||
− | -0500 CDT America/Cancun |
||
− | -0500 CDT America/Merida |
||
− | -0500 CDT America/Monterrey |
||
− | -0600 MDT America/Mazatlan |
||
− | -0600 MDT America/Chihuahua |
||
− | -0700 MST America/Hermosillo |
||
− | -0700 PDT America/Tijuana |
||
− | +0800 MYT Asia/Kuala_Lumpur |
||
− | +0800 MYT Asia/Kuching |
||
− | +0200 CAT Africa/Maputo |
||
− | +0100 WAT Africa/Windhoek |
||
− | +1100 NCT Pacific/Noumea |
||
− | +0100 WAT Africa/Niamey |
||
− | +1130 NFT Pacific/Norfolk |
||
− | +0100 WAT Africa/Lagos |
||
− | -0600 CST America/Managua |
||
− | +0200 CEST Europe/Amsterdam |
||
− | +0200 CEST Europe/Oslo |
||
− | +0545 NPT Asia/Katmandu |
||
− | +1200 NRT Pacific/Nauru |
||
− | -1100 NUT Pacific/Niue |
||
− | +1200 NZST Pacific/Auckland |
||
− | +1245 CHAST Pacific/Chatham |
||
− | +0400 GST Asia/Muscat |
||
− | -0500 EST America/Panama |
||
− | -0500 PET America/Lima |
||
− | -1000 TAHT Pacific/Tahiti |
||
− | -0930 MART Pacific/Marquesas |
||
− | -0900 GAMT Pacific/Gambier |
||
− | +1000 PGT Pacific/Port_Moresby |
||
− | +0800 PHT Asia/Manila |
||
− | +0500 PKT Asia/Karachi |
||
− | +0200 CEST Europe/Warsaw |
||
− | -0200 PMDT America/Miquelon |
||
− | -0800 PST Pacific/Pitcairn |
||
− | -0400 AST America/Puerto_Rico |
||
− | +0300 EEST Asia/Gaza |
||
− | +0100 WEST Europe/Lisbon |
||
− | +0100 WEST Atlantic/Madeira |
||
− | +0000 AZOST Atlantic/Azores |
||
− | +0900 PWT Pacific/Palau |
||
− | -0400 PYT America/Asuncion |
||
− | +0300 AST Asia/Qatar |
||
− | +0400 RET Indian/Reunion |
||
− | +0300 EEST Europe/Bucharest |
||
− | +0300 EEST Europe/Kaliningrad |
||
− | +0400 MSD Europe/Moscow |
||
− | +0500 SAMST Europe/Samara |
||
− | +0600 YEKST Asia/Yekaterinburg |
||
− | +0700 OMSST Asia/Omsk |
||
− | +0700 NOVST Asia/Novosibirsk |
||
− | +0800 KRAST Asia/Krasnoyarsk |
||
− | +0900 IRKST Asia/Irkutsk |
||
− | +1000 YAKST Asia/Yakutsk |
||
− | +1100 VLAST Asia/Vladivostok |
||
− | +1100 SAKST Asia/Sakhalin |
||
− | +1200 MAGST Asia/Magadan |
||
− | +1300 PETST Asia/Kamchatka |
||
− | +1300 ANAST Asia/Anadyr |
||
− | +0200 CAT Africa/Kigali |
||
− | +0300 AST Asia/Riyadh |
||
− | +1100 SBT Pacific/Guadalcanal |
||
− | +0400 SCT Indian/Mahe |
||
− | +0300 EAT Africa/Khartoum |
||
− | +0200 CEST Europe/Stockholm |
||
− | +0800 SGT Asia/Singapore |
||
− | +0000 GMT Atlantic/St_Helena |
||
− | +0200 CEST Europe/Ljubljana |
||
− | +0200 CEST Arctic/Longyearbyen |
||
− | +0200 CEST Atlantic/Jan_Mayen |
||
− | +0200 CEST Europe/Bratislava |
||
− | +0000 GMT Africa/Freetown |
||
− | +0200 CEST Europe/San_Marino |
||
− | +0000 GMT Africa/Dakar |
||
− | +0300 EAT Africa/Mogadishu |
||
− | -0300 SRT America/Paramaribo |
||
− | +0000 GMT Africa/Sao_Tome |
||
− | -0600 CST America/El_Salvador |
||
− | +0300 EEST Asia/Damascus |
||
− | +0200 SAST Africa/Mbabane |
||
− | -0400 EDT America/Grand_Turk |
||
− | +0100 WAT Africa/Ndjamena |
||
− | +0500 TFT Indian/Kerguelen |
||
− | +0000 GMT Africa/Lome |
||
− | +0700 ICT Asia/Bangkok |
||
− | +0500 TJT Asia/Dushanbe |
||
− | -1000 TKT Pacific/Fakaofo |
||
− | +0500 TMT Asia/Ashgabat |
||
− | +0100 CET Africa/Tunis |
||
− | +1300 TOT Pacific/Tongatapu |
||
− | +0900 TPT Asia/Dili |
||
− | +0300 EEST Europe/Istanbul |
||
− | -0400 AST |
Revision as of 02:04, 25 October 2007
Because people keep thinking that the "EST" in my `date` command must be incorrect...
#!/bin/bash function dotz () { while read i ; do export TZ=$(echo $i | awk -F' ' '{print $3}') OFFSET=$(date +%z) TLA=$(date +%Z) echo -e "$OFFSET\t$TLA\t$TZ" >> foo done } grep -v "^#" /usr/share/zoneinfo/zone.tab > tz.list dotz < tz.list sort -k2 foo > timezones
See results at http://www.cheeky.house.cx/~nemo/extras/timezones
First columns is time offset, third column is the $TZ environment variable. The Second column is the time zone identifier, incorrectly assumed by most people to be unique. I can't find an RFC on it though :(