How to Apply the OlsonNames() Function in R (Example Code)

In this R tutorial you’ll learn how to return all known time zone locations using the OlsonNames function.

Example: How to Return Known Time Zone Locations Using OlsonNames() Function

OlsonNames()                     # Return known time zone locations
#   [1] "Africa/Abidjan"                   "Africa/Accra"                    
#   [3] "Africa/Addis_Ababa"               "Africa/Algiers"                  
#   [5] "Africa/Asmara"                    "Africa/Asmera"                   
#   [7] "Africa/Bamako"                    "Africa/Bangui"                   
#   [9] "Africa/Banjul"                    "Africa/Bissau"                   
#  [11] "Africa/Blantyre"                  "Africa/Brazzaville"              
#  [13] "Africa/Bujumbura"                 "Africa/Cairo"                    
#  [15] "Africa/Casablanca"                "Africa/Ceuta"                    
#  [17] "Africa/Conakry"                   "Africa/Dakar"                    
#  [19] "Africa/Dar_es_Salaam"             "Africa/Djibouti"                 
#  [21] "Africa/Douala"                    "Africa/El_Aaiun"                 
#  [23] "Africa/Freetown"                  "Africa/Gaborone"                 
#  [25] "Africa/Harare"                    "Africa/Johannesburg"             
#  [27] "Africa/Juba"                      "Africa/Kampala"                  
#  [29] "Africa/Khartoum"                  "Africa/Kigali"                   
#  [31] "Africa/Kinshasa"                  "Africa/Lagos"                    
#  [33] "Africa/Libreville"                "Africa/Lome"                     
#  [35] "Africa/Luanda"                    "Africa/Lubumbashi"               
#  [37] "Africa/Lusaka"                    "Africa/Malabo"                   
#  [39] "Africa/Maputo"                    "Africa/Maseru"                   
#  [41] "Africa/Mbabane"                   "Africa/Mogadishu"                
#  [43] "Africa/Monrovia"                  "Africa/Nairobi"                  
#  [45] "Africa/Ndjamena"                  "Africa/Niamey"                   
#  [47] "Africa/Nouakchott"                "Africa/Ouagadougou"              
#  [49] "Africa/Porto-Novo"                "Africa/Sao_Tome"                 
#  [51] "Africa/Timbuktu"                  "Africa/Tripoli"                  
#  [53] "Africa/Tunis"                     "Africa/Windhoek"                 
#  [55] "America/Adak"                     "America/Anchorage"               
#  [57] "America/Anguilla"                 "America/Antigua"                 
#  [59] "America/Araguaina"                "America/Argentina/Buenos_Aires"  
#  [61] "America/Argentina/Catamarca"      "America/Argentina/ComodRivadavia"
#  [63] "America/Argentina/Cordoba"        "America/Argentina/Jujuy"         
#  [65] "America/Argentina/La_Rioja"       "America/Argentina/Mendoza"       
#  [67] "America/Argentina/Rio_Gallegos"   "America/Argentina/Salta"         
#  [69] "America/Argentina/San_Juan"       "America/Argentina/San_Luis"      
#  [71] "America/Argentina/Tucuman"        "America/Argentina/Ushuaia"       
#  [73] "America/Aruba"                    "America/Asuncion"                
#  [75] "America/Atikokan"                 "America/Atka"                    
#  [77] "America/Bahia"                    "America/Bahia_Banderas"          
#  [79] "America/Barbados"                 "America/Belem"                   
#  [81] "America/Belize"                   "America/Blanc-Sablon"            
#  [83] "America/Boa_Vista"                "America/Bogota"                  
#  [85] "America/Boise"                    "America/Buenos_Aires"            
#  [87] "America/Cambridge_Bay"            "America/Campo_Grande"            
#  [89] "America/Cancun"                   "America/Caracas"                 
#  [91] "America/Catamarca"                "America/Cayenne"                 
#  [93] "America/Cayman"                   "America/Chicago"                 
#  [95] "America/Chihuahua"                "America/Coral_Harbour"           
#  [97] "America/Cordoba"                  "America/Costa_Rica"              
#  [99] "America/Creston"                  "America/Cuiaba"                  
# [101] "America/Curacao"                  "America/Danmarkshavn"            
# [103] "America/Dawson"                   "America/Dawson_Creek"            
# [105] "America/Denver"                   "America/Detroit"                 
# [107] "America/Dominica"                 "America/Edmonton"                
# [109] "America/Eirunepe"                 "America/El_Salvador"             
# [111] "America/Ensenada"                 "America/Fort_Nelson"             
# [113] "America/Fort_Wayne"               "America/Fortaleza"               
# [115] "America/Glace_Bay"                "America/Godthab"                 
# [117] "America/Goose_Bay"                "America/Grand_Turk"              
# [119] "America/Grenada"                  "America/Guadeloupe"              
# [121] "America/Guatemala"                "America/Guayaquil"               
# [123] "America/Guyana"                   "America/Halifax"                 
# [125] "America/Havana"                   "America/Hermosillo"              
# [127] "America/Indiana/Indianapolis"     "America/Indiana/Knox"            
# [129] "America/Indiana/Marengo"          "America/Indiana/Petersburg"      
# [131] "America/Indiana/Tell_City"        "America/Indiana/Vevay"           
# [133] "America/Indiana/Vincennes"        "America/Indiana/Winamac"         
# [135] "America/Indianapolis"             "America/Inuvik"                  
# [137] "America/Iqaluit"                  "America/Jamaica"                 
# [139] "America/Jujuy"                    "America/Juneau"                  
# [141] "America/Kentucky/Louisville"      "America/Kentucky/Monticello"     
# [143] "America/Knox_IN"                  "America/Kralendijk"              
# [145] "America/La_Paz"                   "America/Lima"                    
# [147] "America/Los_Angeles"              "America/Louisville"              
# [149] "America/Lower_Princes"            "America/Maceio"                  
# [151] "America/Managua"                  "America/Manaus"                  
# [153] "America/Marigot"                  "America/Martinique"              
# [155] "America/Matamoros"                "America/Mazatlan"                
# [157] "America/Mendoza"                  "America/Menominee"               
# [159] "America/Merida"                   "America/Metlakatla"              
# [161] "America/Mexico_City"              "America/Miquelon"                
# [163] "America/Moncton"                  "America/Monterrey"               
# [165] "America/Montevideo"               "America/Montreal"                
# [167] "America/Montserrat"               "America/Nassau"                  
# [169] "America/New_York"                 "America/Nipigon"                 
# [171] "America/Nome"                     "America/Noronha"                 
# [173] "America/North_Dakota/Beulah"      "America/North_Dakota/Center"     
# [175] "America/North_Dakota/New_Salem"   "America/Nuuk"                    
# [177] "America/Ojinaga"                  "America/Panama"                  
# [179] "America/Pangnirtung"              "America/Paramaribo"              
# [181] "America/Phoenix"                  "America/Port_of_Spain"           
# [183] "America/Port-au-Prince"           "America/Porto_Acre"              
# [185] "America/Porto_Velho"              "America/Puerto_Rico"             
# [187] "America/Punta_Arenas"             "America/Rainy_River"             
# [189] "America/Rankin_Inlet"             "America/Recife"                  
# [191] "America/Regina"                   "America/Resolute"                
# [193] "America/Rio_Branco"               "America/Rosario"                 
# [195] "America/Santa_Isabel"             "America/Santarem"                
# [197] "America/Santiago"                 "America/Santo_Domingo"           
# [199] "America/Sao_Paulo"                "America/Scoresbysund"            
# [201] "America/Shiprock"                 "America/Sitka"                   
# [203] "America/St_Barthelemy"            "America/St_Johns"                
# [205] "America/St_Kitts"                 "America/St_Lucia"                
# [207] "America/St_Thomas"                "America/St_Vincent"              
# [209] "America/Swift_Current"            "America/Tegucigalpa"             
# [211] "America/Thule"                    "America/Thunder_Bay"             
# [213] "America/Tijuana"                  "America/Toronto"                 
# [215] "America/Tortola"                  "America/Vancouver"               
# [217] "America/Virgin"                   "America/Whitehorse"              
# [219] "America/Winnipeg"                 "America/Yakutat"                 
# [221] "America/Yellowknife"              "Antarctica/Casey"                
# [223] "Antarctica/Davis"                 "Antarctica/DumontDUrville"       
# [225] "Antarctica/Macquarie"             "Antarctica/Mawson"               
# [227] "Antarctica/McMurdo"               "Antarctica/Palmer"               
# [229] "Antarctica/Rothera"               "Antarctica/South_Pole"           
# [231] "Antarctica/Syowa"                 "Antarctica/Troll"                
# [233] "Antarctica/Vostok"                "Arctic/Longyearbyen"             
# [235] "Asia/Aden"                        "Asia/Almaty"                     
# [237] "Asia/Amman"                       "Asia/Anadyr"                     
# [239] "Asia/Aqtau"                       "Asia/Aqtobe"                     
# [241] "Asia/Ashgabat"                    "Asia/Ashkhabad"                  
# [243] "Asia/Atyrau"                      "Asia/Baghdad"                    
# [245] "Asia/Bahrain"                     "Asia/Baku"                       
# [247] "Asia/Bangkok"                     "Asia/Barnaul"                    
# [249] "Asia/Beirut"                      "Asia/Bishkek"                    
# [251] "Asia/Brunei"                      "Asia/Calcutta"                   
# [253] "Asia/Chita"                       "Asia/Choibalsan"                 
# [255] "Asia/Chongqing"                   "Asia/Chungking"                  
# [257] "Asia/Colombo"                     "Asia/Dacca"                      
# [259] "Asia/Damascus"                    "Asia/Dhaka"                      
# [261] "Asia/Dili"                        "Asia/Dubai"                      
# [263] "Asia/Dushanbe"                    "Asia/Famagusta"                  
# [265] "Asia/Gaza"                        "Asia/Harbin"                     
# [267] "Asia/Hebron"                      "Asia/Ho_Chi_Minh"                
# [269] "Asia/Hong_Kong"                   "Asia/Hovd"                       
# [271] "Asia/Irkutsk"                     "Asia/Istanbul"                   
# [273] "Asia/Jakarta"                     "Asia/Jayapura"                   
# [275] "Asia/Jerusalem"                   "Asia/Kabul"                      
# [277] "Asia/Kamchatka"                   "Asia/Karachi"                    
# [279] "Asia/Kashgar"                     "Asia/Kathmandu"                  
# [281] "Asia/Katmandu"                    "Asia/Khandyga"                   
# [283] "Asia/Kolkata"                     "Asia/Krasnoyarsk"                
# [285] "Asia/Kuala_Lumpur"                "Asia/Kuching"                    
# [287] "Asia/Kuwait"                      "Asia/Macao"                      
# [289] "Asia/Macau"                       "Asia/Magadan"                    
# [291] "Asia/Makassar"                    "Asia/Manila"                     
# [293] "Asia/Muscat"                      "Asia/Nicosia"                    
# [295] "Asia/Novokuznetsk"                "Asia/Novosibirsk"                
# [297] "Asia/Omsk"                        "Asia/Oral"                       
# [299] "Asia/Phnom_Penh"                  "Asia/Pontianak"                  
# [301] "Asia/Pyongyang"                   "Asia/Qatar"                      
# [303] "Asia/Qostanay"                    "Asia/Qyzylorda"                  
# [305] "Asia/Rangoon"                     "Asia/Riyadh"                     
# [307] "Asia/Saigon"                      "Asia/Sakhalin"                   
# [309] "Asia/Samarkand"                   "Asia/Seoul"                      
# [311] "Asia/Shanghai"                    "Asia/Singapore"                  
# [313] "Asia/Srednekolymsk"               "Asia/Taipei"                     
# [315] "Asia/Tashkent"                    "Asia/Tbilisi"                    
# [317] "Asia/Tehran"                      "Asia/Tel_Aviv"                   
# [319] "Asia/Thimbu"                      "Asia/Thimphu"                    
# [321] "Asia/Tokyo"                       "Asia/Tomsk"                      
# [323] "Asia/Ujung_Pandang"               "Asia/Ulaanbaatar"                
# [325] "Asia/Ulan_Bator"                  "Asia/Urumqi"                     
# [327] "Asia/Ust-Nera"                    "Asia/Vientiane"                  
# [329] "Asia/Vladivostok"                 "Asia/Yakutsk"                    
# [331] "Asia/Yangon"                      "Asia/Yekaterinburg"              
# [333] "Asia/Yerevan"                     "Atlantic/Azores"                 
# [335] "Atlantic/Bermuda"                 "Atlantic/Canary"                 
# [337] "Atlantic/Cape_Verde"              "Atlantic/Faeroe"                 
# [339] "Atlantic/Faroe"                   "Atlantic/Jan_Mayen"              
# [341] "Atlantic/Madeira"                 "Atlantic/Reykjavik"              
# [343] "Atlantic/South_Georgia"           "Atlantic/St_Helena"              
# [345] "Atlantic/Stanley"                 "Australia/ACT"                   
# [347] "Australia/Adelaide"               "Australia/Brisbane"              
# [349] "Australia/Broken_Hill"            "Australia/Canberra"              
# [351] "Australia/Currie"                 "Australia/Darwin"                
# [353] "Australia/Eucla"                  "Australia/Hobart"                
# [355] "Australia/LHI"                    "Australia/Lindeman"              
# [357] "Australia/Lord_Howe"              "Australia/Melbourne"             
# [359] "Australia/North"                  "Australia/NSW"                   
# [361] "Australia/Perth"                  "Australia/Queensland"            
# [363] "Australia/South"                  "Australia/Sydney"                
# [365] "Australia/Tasmania"               "Australia/Victoria"              
# [367] "Australia/West"                   "Australia/Yancowinna"            
# [369] "Brazil/Acre"                      "Brazil/DeNoronha"                
# [371] "Brazil/East"                      "Brazil/West"                     
# [373] "Canada/Atlantic"                  "Canada/Central"                  
# [375] "Canada/Eastern"                   "Canada/Mountain"                 
# [377] "Canada/Newfoundland"              "Canada/Pacific"                  
# [379] "Canada/Saskatchewan"              "Canada/Yukon"                    
# [381] "CET"                              "Chile/Continental"               
# [383] "Chile/EasterIsland"               "CST6CDT"                         
# [385] "Cuba"                             "EET"                             
# [387] "Egypt"                            "Eire"                            
# [389] "EST"                              "EST5EDT"                         
# [391] "Etc/GMT"                          "Etc/GMT-0"                       
# [393] "Etc/GMT-1"                        "Etc/GMT-10"                      
# [395] "Etc/GMT-11"                       "Etc/GMT-12"                      
# [397] "Etc/GMT-13"                       "Etc/GMT-14"                      
# [399] "Etc/GMT-2"                        "Etc/GMT-3"                       
# [401] "Etc/GMT-4"                        "Etc/GMT-5"                       
# [403] "Etc/GMT-6"                        "Etc/GMT-7"                       
# [405] "Etc/GMT-8"                        "Etc/GMT-9"                       
# [407] "Etc/GMT+0"                        "Etc/GMT+1"                       
# [409] "Etc/GMT+10"                       "Etc/GMT+11"                      
# [411] "Etc/GMT+12"                       "Etc/GMT+2"                       
# [413] "Etc/GMT+3"                        "Etc/GMT+4"                       
# [415] "Etc/GMT+5"                        "Etc/GMT+6"                       
# [417] "Etc/GMT+7"                        "Etc/GMT+8"                       
# [419] "Etc/GMT+9"                        "Etc/GMT0"                        
# [421] "Etc/Greenwich"                    "Etc/UCT"                         
# [423] "Etc/Universal"                    "Etc/UTC"                         
# [425] "Etc/Zulu"                         "Europe/Amsterdam"                
# [427] "Europe/Andorra"                   "Europe/Astrakhan"                
# [429] "Europe/Athens"                    "Europe/Belfast"                  
# [431] "Europe/Belgrade"                  "Europe/Berlin"                   
# [433] "Europe/Bratislava"                "Europe/Brussels"                 
# [435] "Europe/Bucharest"                 "Europe/Budapest"                 
# [437] "Europe/Busingen"                  "Europe/Chisinau"                 
# [439] "Europe/Copenhagen"                "Europe/Dublin"                   
# [441] "Europe/Gibraltar"                 "Europe/Guernsey"                 
# [443] "Europe/Helsinki"                  "Europe/Isle_of_Man"              
# [445] "Europe/Istanbul"                  "Europe/Jersey"                   
# [447] "Europe/Kaliningrad"               "Europe/Kiev"                     
# [449] "Europe/Kirov"                     "Europe/Lisbon"                   
# [451] "Europe/Ljubljana"                 "Europe/London"                   
# [453] "Europe/Luxembourg"                "Europe/Madrid"                   
# [455] "Europe/Malta"                     "Europe/Mariehamn"                
# [457] "Europe/Minsk"                     "Europe/Monaco"                   
# [459] "Europe/Moscow"                    "Europe/Nicosia"                  
# [461] "Europe/Oslo"                      "Europe/Paris"                    
# [463] "Europe/Podgorica"                 "Europe/Prague"                   
# [465] "Europe/Riga"                      "Europe/Rome"                     
# [467] "Europe/Samara"                    "Europe/San_Marino"               
# [469] "Europe/Sarajevo"                  "Europe/Saratov"                  
# [471] "Europe/Simferopol"                "Europe/Skopje"                   
# [473] "Europe/Sofia"                     "Europe/Stockholm"                
# [475] "Europe/Tallinn"                   "Europe/Tirane"                   
# [477] "Europe/Tiraspol"                  "Europe/Ulyanovsk"                
# [479] "Europe/Uzhgorod"                  "Europe/Vaduz"                    
# [481] "Europe/Vatican"                   "Europe/Vienna"                   
# [483] "Europe/Vilnius"                   "Europe/Volgograd"                
# [485] "Europe/Warsaw"                    "Europe/Zagreb"                   
# [487] "Europe/Zaporozhye"                "Europe/Zurich"                   
# [489] "Factory"                          "GB"                              
# [491] "GB-Eire"                          "GMT"                             
# [493] "GMT-0"                            "GMT+0"                           
# [495] "GMT0"                             "Greenwich"                       
# [497] "Hongkong"                         "HST"                             
# [499] "Iceland"                          "Indian/Antananarivo"             
# [501] "Indian/Chagos"                    "Indian/Christmas"                
# [503] "Indian/Cocos"                     "Indian/Comoro"                   
# [505] "Indian/Kerguelen"                 "Indian/Mahe"                     
# [507] "Indian/Maldives"                  "Indian/Mauritius"                
# [509] "Indian/Mayotte"                   "Indian/Reunion"                  
# [511] "Iran"                             "Israel"                          
# [513] "Jamaica"                          "Japan"                           
# [515] "Kwajalein"                        "Libya"                           
# [517] "MET"                              "Mexico/BajaNorte"                
# [519] "Mexico/BajaSur"                   "Mexico/General"                  
# [521] "MST"                              "MST7MDT"                         
# [523] "Navajo"                           "NZ"                              
# [525] "NZ-CHAT"                          "Pacific/Apia"                    
# [527] "Pacific/Auckland"                 "Pacific/Bougainville"            
# [529] "Pacific/Chatham"                  "Pacific/Chuuk"                   
# [531] "Pacific/Easter"                   "Pacific/Efate"                   
# [533] "Pacific/Enderbury"                "Pacific/Fakaofo"                 
# [535] "Pacific/Fiji"                     "Pacific/Funafuti"                
# [537] "Pacific/Galapagos"                "Pacific/Gambier"                 
# [539] "Pacific/Guadalcanal"              "Pacific/Guam"                    
# [541] "Pacific/Honolulu"                 "Pacific/Johnston"                
# [543] "Pacific/Kiritimati"               "Pacific/Kosrae"                  
# [545] "Pacific/Kwajalein"                "Pacific/Majuro"                  
# [547] "Pacific/Marquesas"                "Pacific/Midway"                  
# [549] "Pacific/Nauru"                    "Pacific/Niue"                    
# [551] "Pacific/Norfolk"                  "Pacific/Noumea"                  
# [553] "Pacific/Pago_Pago"                "Pacific/Palau"                   
# [555] "Pacific/Pitcairn"                 "Pacific/Pohnpei"                 
# [557] "Pacific/Ponape"                   "Pacific/Port_Moresby"            
# [559] "Pacific/Rarotonga"                "Pacific/Saipan"                  
# [561] "Pacific/Samoa"                    "Pacific/Tahiti"                  
# [563] "Pacific/Tarawa"                   "Pacific/Tongatapu"               
# [565] "Pacific/Truk"                     "Pacific/Wake"                    
# [567] "Pacific/Wallis"                   "Pacific/Yap"                     
# [569] "Poland"                           "Portugal"                        
# [571] "PRC"                              "PST8PDT"                         
# [573] "ROC"                              "ROK"                             
# [575] "Singapore"                        "SystemV/AST4"                    
# [577] "SystemV/AST4ADT"                  "SystemV/CST6"                    
# [579] "SystemV/CST6CDT"                  "SystemV/EST5"                    
# [581] "SystemV/EST5EDT"                  "SystemV/HST10"                   
# [583] "SystemV/MST7"                     "SystemV/MST7MDT"                 
# [585] "SystemV/PST8"                     "SystemV/PST8PDT"                 
# [587] "SystemV/YST9"                     "SystemV/YST9YDT"                 
# [589] "Turkey"                           "UCT"                             
# [591] "Universal"                        "US/Alaska"                       
# [593] "US/Aleutian"                      "US/Arizona"                      
# [595] "US/Central"                       "US/East-Indiana"                 
# [597] "US/Eastern"                       "US/Hawaii"                       
# [599] "US/Indiana-Starke"                "US/Michigan"                     
# [601] "US/Mountain"                      "US/Pacific"                      
# [603] "US/Samoa"                         "UTC"                             
# [605] "W-SU"                             "WET"                             
# [607] "Zulu"

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top