PHP Classes
elePHPant
Icontem

PHP TimeZones: Retrieve or validate world time zones

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-10-14 (2 hours ago) RSS 2.0 feedStarStarStar 40%Total: 117 All time: 9,076 This week: 326Up
Version License PHP version Categories
timezones 0.1Custom (specified...5PHP 5, Time and Date, Geography
Description Author

This is a simple class that can retrieve or validate world time zones.

It can return associative array with the list of all timezones by name and the time offsets relative to UTC.

The class can also validate if a given timezone name is known.

Innovation Award
PHP Programming Innovation award nominee
March 2017
Number 10
The world is divided into regions with different time zones, each with one time difference relative to the UTC time.

This class has the information of all the different time zones. It can validate time zones by name, as well return the time zones and the respective time offset.

Manuel Lemos
  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom United Kingdom
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

 

Details

Time Zones

Downloads License If this project has business value for you then don't hesitate to support me with a small donation.

Array of world time zones sorted according to current time offset.

Usage

Generate HTML code for SELECT tag:

use peterkahl\timeZones\timeZones;

echo '<select>'. PHP_EOL;
$zones = timeZones::getZones(true);
foreach ($zones as $code => $val) {
  echo '  <option value="'. $val[0] .'">(UTC'. $val[2] .') '. $val[3] .'</option>'. PHP_EOL;
}
echo '</select>'. PHP_EOL;

/*
<select>
  <option value="Pacific/Midway">(UTC-1100) Midway Atoll, United States</option>
  <option value="Pacific/Niue">(UTC-1100) Niue</option>
  <option value="Pacific/Pago_Pago">(UTC-1100) Pago Pago, United States</option>
  <option value="America/Adak">(UTC-1000) Adak, United States</option>
  <option value="Pacific/Honolulu">(UTC-1000) Honolulu, United States</option>
  <option value="Pacific/Johnston">(UTC-1000) Johnston Atoll, United States</option>
  <option value="Pacific/Rarotonga">(UTC-1000) Rarotonga, Cook Islands</option>
  <option value="Pacific/Tahiti">(UTC-1000) Tahiti, French Polynesia</option>
  <option value="Pacific/Marquesas">(UTC-0930) Marquesas Islands, French Polynesia</option>
  <option value="America/Anchorage">(UTC-0900) Anchorage, United States</option>
  <option value="Pacific/Gambier">(UTC-0900) Gambier Islands, French Polynesia</option>
  <option value="America/Juneau">(UTC-0900) Juneau, United States</option>
  <option value="America/Nome">(UTC-0900) Nome, United States</option>
  <option value="America/Sitka">(UTC-0900) Sitka, United States</option>
  <option value="America/Yakutat">(UTC-0900) Yakutat, United States</option>
  <option value="America/Dawson">(UTC-0800) Dawson, Canada</option>
  <option value="America/Los_Angeles">(UTC-0800) Los Angeles, United States</option>
  <option value="America/Metlakatla">(UTC-0800) Metlakatla, United States</option>
  <option value="Pacific/Pitcairn">(UTC-0800) Pitcairn Islands</option>
  <option value="America/Santa_Isabel">(UTC-0800) Santa Isabel, Mexico</option>
  <option value="America/Tijuana">(UTC-0800) Tijuana, Mexico</option>
  <option value="America/Vancouver">(UTC-0800) Vancouver, Canada</option>
  <option value="America/Whitehorse">(UTC-0800) Whitehorse, Canada</option>
  <option value="America/Boise">(UTC-0700) Boise, United States</option>
  <option value="America/Cambridge_Bay">(UTC-0700) Cambridge Bay, Canada</option>
  <option value="America/Chihuahua">(UTC-0700) Chihuahua City, Mexico</option>
  <option value="America/Creston">(UTC-0700) Creston, Canada</option>
  <option value="America/Dawson_Creek">(UTC-0700) Dawson Creek, Canada</option>
  <option value="America/Denver">(UTC-0700) Denver, United States</option>
  <option value="America/Edmonton">(UTC-0700) Edmonton, Canada</option>
  <option value="America/Fort_Nelson">(UTC-0700) Fort Nelson, Canada</option>
  <option value="America/Hermosillo">(UTC-0700) Hermosillo, Mexico</option>
  <option value="America/Inuvik">(UTC-0700) Inuvik, Canada</option>
  <option value="America/Mazatlan">(UTC-0700) Mazatlan, Mexico</option>
  <option value="America/Ojinaga">(UTC-0700) Ojinaga, Mexico</option>
  <option value="America/Phoenix">(UTC-0700) Phoenix, United States</option>
  <option value="America/Yellowknife">(UTC-0700) Yellowknife, Canada</option>
  <option value="America/Bahia_Banderas">(UTC-0600) Puerto Vallarta, Mexico</option>
  <option value="America/Belize">(UTC-0600) Belize City, Belize</option>
  <option value="America/North_Dakota/Beulah">(UTC-0600) Beulah, United States</option>
  <option value="America/North_Dakota/Center">(UTC-0600) Center, United States</option>
  <option value="America/Chicago">(UTC-0600) Chicago, United States</option>
  <option value="America/Costa_Rica">(UTC-0600) San José, Costa Rica</option>
  <option value="America/El_Salvador">(UTC-0600) San Salvador, El Salvador</option>
  <option value="Pacific/Galapagos">(UTC-0600) Galápagos Islands, Ecuador</option>
  <option value="America/Guatemala">(UTC-0600) Guatemala City, Guatemala</option>
  <option value="America/Indiana/Knox">(UTC-0600) Knox, United States</option>
  <option value="America/Managua">(UTC-0600) Managua, Nicaragua</option>
  <option value="America/Matamoros">(UTC-0600) Matamoros, Mexico</option>
  <option value="America/Menominee">(UTC-0600) Menominee, United States</option>
  <option value="America/Merida">(UTC-0600) Mérida, Mexico</option>
  <option value="America/Mexico_City">(UTC-0600) Mexico City, Mexico</option>
  <option value="America/Monterrey">(UTC-0600) Monterrey, Mexico</option>
  <option value="America/North_Dakota/New_Salem">(UTC-0600) New Salem, United States</option>
  <option value="America/Rainy_River">(UTC-0600) Rainy River, Canada</option>
  <option value="America/Rankin_Inlet">(UTC-0600) Rankin Inlet, Canada</option>
  <option value="America/Regina">(UTC-0600) Regina, Canada</option>
  <option value="America/Resolute">(UTC-0600) Resolute, Canada</option>
  <option value="America/Swift_Current">(UTC-0600) Swift Current, Canada</option>
  <option value="America/Tegucigalpa">(UTC-0600) Tegucigalpa, Honduras</option>
  <option value="America/Indiana/Tell_City">(UTC-0600) Tell City, United States</option>
  <option value="America/Winnipeg">(UTC-0600) Winnipeg, Canada</option>
  <option value="America/Atikokan">(UTC-0500) Atikokan, Canada</option>
  <option value="America/Bogota">(UTC-0500) Bogotá, Colombia</option>
  <option value="America/Cancun">(UTC-0500) Cancún, Mexico</option>
  <option value="America/Cayman">(UTC-0500) Cayman Islands</option>
  <option value="America/Detroit">(UTC-0500) Detroit, United States</option>
  <option value="Pacific/Easter">(UTC-0500) Easter Island, Chile</option>
  <option value="America/Eirunepe">(UTC-0500) Eirunepé, Brazil</option>
  <option value="America/Guayaquil">(UTC-0500) Guayaquil, Ecuador</option>
  <option value="America/Havana">(UTC-0500) Havana, Cuba</option>
  <option value="America/Indiana/Indianapolis">(UTC-0500) Indianapolis, United States</option>
  <option value="America/Iqaluit">(UTC-0500) Iqaluit, Canada</option>
  <option value="America/Jamaica">(UTC-0500) Kingston, Jamaica</option>
  <option value="America/Lima">(UTC-0500) Lima, Peru</option>
  <option value="America/Kentucky/Louisville">(UTC-0500) Louisville, United States</option>
  <option value="America/Indiana/Marengo">(UTC-0500) Marengo, United States</option>
  <option value="America/Kentucky/Monticello">(UTC-0500) Monticello, United States</option>
  <option value="America/Nassau">(UTC-0500) Nassau, Bahamas</option>
  <option value="America/New_York">(UTC-0500) New York, United States</option>
  <option value="America/Nipigon">(UTC-0500) Nipigon, Canada</option>
  <option value="America/Panama">(UTC-0500) Panama City, Panama</option>
  <option value="America/Pangnirtung">(UTC-0500) Pangnirtung, Canada</option>
  <option value="America/Indiana/Petersburg">(UTC-0500) Petersburg, United States</option>
  <option value="America/Port-au-Prince">(UTC-0500) Port-au-Prince, Haiti</option>
  <option value="America/Rio_Branco">(UTC-0500) Rio Branco, Brazil</option>
  <option value="America/Thunder_Bay">(UTC-0500) Thunder Bay, Canada</option>
  <option value="America/Toronto">(UTC-0500) Toronto, Canada</option>
  <option value="America/Indiana/Vevay">(UTC-0500) Vevay, United States</option>
  <option value="America/Indiana/Vincennes">(UTC-0500) Vincennes, United States</option>
  <option value="America/Indiana/Winamac">(UTC-0500) Winamac, United States</option>
  <option value="America/Grand_Turk">(UTC-0500) Grand Turk, Turks and Caicos Islands</option>
  <option value="America/Anguilla">(UTC-0400) Anguilla</option>
  <option value="America/Antigua">(UTC-0400) Antigua and Barbuda</option>
  <option value="America/Aruba">(UTC-0400) Oranjestad, Aruba</option>
  <option value="America/Barbados">(UTC-0400) Bridgetown, Barbados</option>
  <option value="Atlantic/Bermuda">(UTC-0400) Bermuda</option>
  <option value="America/Blanc-Sablon">(UTC-0400) Blanc-Sablon, Canada</option>
  <option value="America/Boa_Vista">(UTC-0400) Boa Vista, Brazil</option>
  <option value="America/Caracas">(UTC-0400) Caracas, Venezuela</option>
  <option value="America/Curacao">(UTC-0400) Willemstad, Curaçao</option>
  <option value="America/Dominica">(UTC-0400) Roseau, Dominica</option>
  <option value="America/Glace_Bay">(UTC-0400) Glace Bay, Canada</option>
  <option value="America/Goose_Bay">(UTC-0400) Goose Bay, Canada</option>
  <option value="America/Grenada">(UTC-0400) St George's, Grenada</option>
  <option value="America/Guadeloupe">(UTC-0400) Basse-Terre, Guadeloupe</option>
  <option value="America/Guyana">(UTC-0400) Georgetown, Guyana</option>
  <option value="America/Halifax">(UTC-0400) Halifax, Canada</option>
  <option value="America/Kralendijk">(UTC-0400) Kralendijk, Caribbean Netherlands</option>
  <option value="America/La_Paz">(UTC-0400) La Paz, Bolivia</option>
  <option value="America/Lower_Princes">(UTC-0400) Sint Maarten</option>
  <option value="America/Manaus">(UTC-0400) Manaus, Brazil</option>
  <option value="America/Marigot">(UTC-0400) Marigot, Saint Martin</option>
  <option value="America/Martinique">(UTC-0400) Martinique</option>
  <option value="America/Moncton">(UTC-0400) Moncton, Canada</option>
  <option value="America/Montserrat">(UTC-0400) Montserrat</option>
  <option value="America/Port_of_Spain">(UTC-0400) Port of Spain, Trinidad and Tobago</option>
  <option value="America/Porto_Velho">(UTC-0400) Porto Velho, Brazil</option>
  <option value="America/Puerto_Rico">(UTC-0400) San Juan, Puerto Rico</option>
  <option value="America/Santo_Domingo">(UTC-0400) Santo Domingo, Dominican Republic</option>
  <option value="America/St_Barthelemy">(UTC-0400) Saint Barthélemy</option>
  <option value="America/St_Kitts">(UTC-0400) Saint Kitts and Nevis</option>
  <option value="America/St_Lucia">(UTC-0400) Saint Lucia</option>
  <option value="America/St_Thomas">(UTC-0400) Saint Thomas, U.S. Virgin Islands</option>
  <option value="America/St_Vincent">(UTC-0400) Saint Vincent and the Grenadines</option>
  <option value="America/Thule">(UTC-0400) Pituffik, Greenland</option>
  <option value="America/Tortola">(UTC-0400) Tortola, British Virgin Islands</option>
  <option value="America/Campo_Grande">(UTC-0400) Campo Grande, Brazil</option>
  <option value="America/Cuiaba">(UTC-0400) Cuiabá, Brazil</option>
  <option value="America/St_Johns">(UTC-0330) St. John's, Canada</option>
  <option value="America/Araguaina">(UTC-0300) Araguaína, Brazil</option>
  <option value="America/Asuncion">(UTC-0300) Asunción, Paraguay</option>
  <option value="America/Bahia">(UTC-0300) Salvador, Brazil</option>
  <option value="America/Belem">(UTC-0300) Belém, Brazil</option>
  <option value="America/Argentina/Buenos_Aires">(UTC-0300) Buenos Aires, Argentina</option>
  <option value="America/Argentina/Catamarca">(UTC-0300) Catamarca, Argentina</option>
  <option value="America/Cayenne">(UTC-0300) Cayenne, French Guiana</option>
  <option value="America/Argentina/Cordoba">(UTC-0300) Córdoba, Argentina</option>
  <option value="America/Fortaleza">(UTC-0300) Fortaleza, Brazil</option>
  <option value="America/Argentina/La_Rioja">(UTC-0300) La Rioja, Argentina</option>
  <option value="America/Maceio">(UTC-0300) Maceió, Brazil</option>
  <option value="America/Argentina/Mendoza">(UTC-0300) Mendoza, Argentina</option>
  <option value="America/Miquelon">(UTC-0300) Miquelon-Langlade, Saint Pierre and Miquelon</option>
  <option value="America/Montevideo">(UTC-0300) Montevideo, Uruguay</option>
  <option value="America/Godthab">(UTC-0300) Nuuk, Greenland</option>
  <option value="Antarctica/Palmer">(UTC-0300) Palmer Station, Antarctica</option>
  <option value="America/Paramaribo">(UTC-0300) Paramaribo, Suriname</option>
  <option value="America/Recife">(UTC-0300) Recife, Brazil</option>
  <option value="America/Argentina/Rio_Gallegos">(UTC-0300) Río Gallegos, Argentina</option>
  <option value="Antarctica/Rothera">(UTC-0300) Rothera Station, Antarctica</option>
  <option value="America/Argentina/Salta">(UTC-0300) Salta, Argentina</option>
  <option value="America/Argentina/San_Juan">(UTC-0300) San Juan, Argentina</option>
  <option value="America/Argentina/San_Luis">(UTC-0300) San Luis, Argentina</option>
  <option value="America/Argentina/Jujuy">(UTC-0300) San Salvador de Jujuy, Argentina</option>
  <option value="America/Santarem">(UTC-0300) Santarém, Brazil</option>
  <option value="America/Santiago">(UTC-0300) Santiago, Chile</option>
  <option value="America/Argentina/Tucuman">(UTC-0300) San Miguel de Tucumán, Argentina</option>
  <option value="Atlantic/Stanley">(UTC-0300) Stanley, Canada</option>
  <option value="America/Argentina/Ushuaia">(UTC-0300) Ushuaia, Argentina</option>
  <option value="America/Sao_Paulo">(UTC-0300) São Paulo, Brazil</option>
  <option value="America/Noronha">(UTC-0200) Fernando de Noronha, Brazil</option>
  <option value="Atlantic/South_Georgia">(UTC-0200) South Georgia and the South Sandwich Islands</option>
  <option value="Atlantic/Azores">(UTC-0100) Azores, Portugal</option>
  <option value="Atlantic/Cape_Verde">(UTC-0100) Cape Verde</option>
  <option value="America/Scoresbysund">(UTC-0100) Scoresby Sund, Greenland</option>
  <option value="Africa/Abidjan">(UTC+0000) Abidjan, Côte d'Ivoire</option>
  <option value="Africa/Accra">(UTC+0000) Accra, Ghana</option>
  <option value="Africa/Bamako">(UTC+0000) Bamako, Mali</option>
  <option value="Africa/Banjul">(UTC+0000) Banjul, Gambia</option>
  <option value="Africa/Bissau">(UTC+0000) Bissau, Guinea-Bissau</option>
  <option value="Atlantic/Canary">(UTC+0000) Las Palmas de Gran Canaria, Spain</option>
  <option value="Africa/Conakry">(UTC+0000) Conakry, Guinea</option>
  <option value="Africa/Dakar">(UTC+0000) Dakar, Senegal</option>
  <option value="Europe/Dublin">(UTC+0000) Dublin, Ireland</option>
  <option value="Atlantic/Faroe">(UTC+0000) Faroe Islands</option>
  <option value="Africa/Freetown">(UTC+0000) Freetown, Sierra Leone</option>
  <option value="Europe/Guernsey">(UTC+0000) Guernsey</option>
  <option value="Europe/Isle_of_Man">(UTC+0000) Isle of Man</option>
  <option value="Europe/Jersey">(UTC+0000) Jersey</option>
  <option value="Europe/Lisbon">(UTC+0000) Lisbon, Portugal</option>
  <option value="Africa/Lome">(UTC+0000) Lome, Togo</option>
  <option value="Europe/London">(UTC+0000) London, United Kingdom</option>
  <option value="Atlantic/Madeira">(UTC+0000) São Martinho, Portugal</option>
  <option value="Africa/Monrovia">(UTC+0000) Monrovia, Liberia</option>
  <option value="Africa/Nouakchott">(UTC+0000) Nouakchott, Mauritania</option>
  <option value="Africa/Ouagadougou">(UTC+0000) Ouagadougou, Burkina Faso</option>
  <option value="Atlantic/Reykjavik">(UTC+0000) Reykjavík, Iceland</option>
  <option value="Africa/Sao_Tome">(UTC+0000) São Tomé and Príncipe</option>
  <option value="Atlantic/St_Helena">(UTC+0000) Saint Helena, Ascension and Tristan da Cunha</option>
  <option value="Antarctica/Troll">(UTC+0000) Troll Station, Antarctica</option>
  <option value="Africa/Casablanca">(UTC+0100) Casablanca, Morocco</option>
  <option value="Africa/El_Aaiun">(UTC+0100) El-Aaiún, Western Sahara</option>
  <option value="Africa/Algiers">(UTC+0100) Algiers, Algeria</option>
  <option value="Europe/Amsterdam">(UTC+0100) Amsterdam, Netherlands</option>
  <option value="Europe/Andorra">(UTC+0100) Andorra</option>
  <option value="Africa/Bangui">(UTC+0100) Bangui, Central African Republic</option>
  <option value="Europe/Belgrade">(UTC+0100) Belgrade, Serbia</option>
  <option value="Europe/Berlin">(UTC+0100) Berlin, Germany</option>
  <option value="Europe/Bratislava">(UTC+0100) Bratislava, Slovakia</option>
  <option value="Africa/Brazzaville">(UTC+0100) Brazzaville, Republic of the Congo</option>
  <option value="Europe/Brussels">(UTC+0100) Brussels, Belgium</option>
  <option value="Europe/Budapest">(UTC+0100) Budapest, Hungary</option>
  <option value="Europe/Busingen">(UTC+0100) Büsingen am Hochrhein, Germany</option>
  <option value="Africa/Ceuta">(UTC+0100) Ceuta, Spain</option>
  <option value="Europe/Copenhagen">(UTC+0100) Copenhagen, Denmark</option>
  <option value="Africa/Douala">(UTC+0100) Douala, Cameroon</option>
  <option value="Europe/Gibraltar">(UTC+0100) Gibraltar</option>
  <option value="Africa/Kinshasa">(UTC+0100) Kinshasa, Democratic Republic of the Congo</option>
  <option value="Africa/Lagos">(UTC+0100) Lagos, Nigeria</option>
  <option value="Africa/Libreville">(UTC+0100) Libreville, Gabon</option>
  <option value="Europe/Ljubljana">(UTC+0100) Ljubljana, Slovenia</option>
  <option value="Arctic/Longyearbyen">(UTC+0100) Longyearbyen, Svalbard and Jan Mayen</option>
  <option value="Africa/Luanda">(UTC+0100) Luanda, Angola</option>
  <option value="Europe/Luxembourg">(UTC+0100) Luxembourg City, Luxembourg</option>
  <option value="Europe/Madrid">(UTC+0100) Madrid, Spain</option>
  <option value="Africa/Malabo">(UTC+0100) Malabo, Equatorial Guinea</option>
  <option value="Europe/Malta">(UTC+0100) Valletta, Malta</option>
  <option value="Europe/Monaco">(UTC+0100) Monaco City, Monaco</option>
  <option value="Africa/Ndjamena">(UTC+0100) N'Djamena, Chad</option>
  <option value="Africa/Niamey">(UTC+0100) Niamey, Niger</option>
  <option value="Europe/Oslo">(UTC+0100) Oslo, Norway</option>
  <option value="Europe/Paris">(UTC+0100) Paris, France</option>
  <option value="Europe/Podgorica">(UTC+0100) Podgorica, Montenegro</option>
  <option value="Africa/Porto-Novo">(UTC+0100) Porto-Novo, Benin</option>
  <option value="Europe/Prague">(UTC+0100) Prague, Czechia</option>
  <option value="Europe/Rome">(UTC+0100) Rome, Italy</option>
  <option value="Europe/San_Marino">(UTC+0100) San Marino</option>
  <option value="Europe/Sarajevo">(UTC+0100) Sarajevo, Bosnia and Herzegovina</option>
  <option value="Europe/Skopje">(UTC+0100) Skopje, Macedonia</option>
  <option value="Europe/Stockholm">(UTC+0100) Stockholm, Sweden</option>
  <option value="Europe/Tirane">(UTC+0100) Tirane, Albania</option>
  <option value="Africa/Tunis">(UTC+0100) Tunis, Tunisia</option>
  <option value="Europe/Vaduz">(UTC+0100) Vaduz, Liechtenstein</option>
  <option value="Europe/Vatican">(UTC+0100) Vatican City</option>
  <option value="Europe/Vienna">(UTC+0100) Vienna, Austria</option>
  <option value="Europe/Warsaw">(UTC+0100) Warsaw, Poland</option>
  <option value="Europe/Zagreb">(UTC+0100) Zagreb, Croatia</option>
  <option value="Europe/Zurich">(UTC+0100) Zürich, Switzerland</option>
  <option value="Asia/Amman">(UTC+0200) Amman, Jordan</option>
  <option value="Europe/Athens">(UTC+0200) Athens, Greece</option>
  <option value="Asia/Beirut">(UTC+0200) Beirut, Lebanon</option>
  <option value="Africa/Blantyre">(UTC+0200) Blantyre, Malawi</option>
  <option value="Europe/Bucharest">(UTC+0200) Bucharest, Romania</option>
  <option value="Africa/Bujumbura">(UTC+0200) Bujumbura, Burundi</option>
  <option value="Africa/Cairo">(UTC+0200) Cairo, Egypt</option>
  <option value="Europe/Chisinau">(UTC+0200) Chisinau, Moldova</option>
  <option value="Asia/Damascus">(UTC+0200) Damascus, Syria</option>
  <option value="Africa/Gaborone">(UTC+0200) Gaborone, Botswana</option>
  <option value="Asia/Gaza">(UTC+0200) Gaza Strip, Palestine</option>
  <option value="Africa/Harare">(UTC+0200) Harare, Zimbabwe</option>
  <option value="Asia/Hebron">(UTC+0200) Hebron, Palestine</option>
  <option value="Europe/Helsinki">(UTC+0200) Helsinki, Finland</option>
  <option value="Asia/Jerusalem">(UTC+0200) Jerusalem, Israel</option>
  <option value="Africa/Johannesburg">(UTC+0200) Johannesburg, South Africa</option>
  <option value="Europe/Kaliningrad">(UTC+0200) Kaliningrad, Russia</option>
  <option value="Europe/Kiev">(UTC+0200) Kiev, Ukraine</option>
  <option value="Africa/Kigali">(UTC+0200) Kigali, Rwanda</option>
  <option value="Africa/Lubumbashi">(UTC+0200) Lubumbashi, Democratic Republic of the Congo</option>
  <option value="Africa/Lusaka">(UTC+0200) Lusaka, Zambia</option>
  <option value="Africa/Maputo">(UTC+0200) Maputo, Mozambique</option>
  <option value="Europe/Mariehamn">(UTC+0200) Mariehamn, Åland Islands</option>
  <option value="Africa/Maseru">(UTC+0200) Maseru, Lesotho</option>
  <option value="Asia/Nicosia">(UTC+0200) Nicosia, Cyprus</option>
  <option value="Africa/Mbabane">(UTC+0200) Mbabane, Swaziland</option>
  <option value="Europe/Riga">(UTC+0200) Riga, Latvia</option>
  <option value="Europe/Sofia">(UTC+0200) Sofia, Bulgaria</option>
  <option value="Europe/Tallinn">(UTC+0200) Tallinn, Estonia</option>
  <option value="Africa/Tripoli">(UTC+0200) Tripoli, Libya</option>
  <option value="Europe/Uzhgorod">(UTC+0200) Uzhgorod, Ukraine</option>
  <option value="Europe/Vilnius">(UTC+0200) Vilnius, Lithuania</option>
  <option value="Africa/Windhoek">(UTC+0200) Windhoek, Namibia</option>
  <option value="Europe/Zaporozhye">(UTC+0200) Zaporizhia, Ukraine</option>
  <option value="Africa/Khartoum">(UTC+0200) Khartoum, Sudan</option>
  <option value="Africa/Addis_Ababa">(UTC+0300) Addis Ababa, Ethiopia</option>
  <option value="Asia/Aden">(UTC+0300) Aden, Yemen</option>
  <option value="Indian/Antananarivo">(UTC+0300) Antananarivo, Madagascar</option>
  <option value="Africa/Asmara">(UTC+0300) Asmara, Eritrea</option>
  <option value="Asia/Baghdad">(UTC+0300) Baghdad, Iraq</option>
  <option value="Asia/Bahrain">(UTC+0300) Manama, Bahrain</option>
  <option value="Indian/Comoro">(UTC+0300) Moroni, Comoros</option>
  <option value="Africa/Dar_es_Salaam">(UTC+0300) Dar es Salaam, Tanzania</option>
  <option value="Africa/Djibouti">(UTC+0300) Djibouti</option>
  <option value="Europe/Istanbul">(UTC+0300) Istanbul, Turkey</option>
  <option value="Africa/Juba">(UTC+0300) Juba, South Sudan</option>
  <option value="Africa/Kampala">(UTC+0300) Kampala, Uganda</option>
  <option value="Asia/Kuwait">(UTC+0300) Kuwait City, Kuwait</option>
  <option value="Indian/Mayotte">(UTC+0300) Mamoudzou, Mayotte</option>
  <option value="Europe/Minsk">(UTC+0300) Minsk, Belarus</option>
  <option value="Africa/Mogadishu">(UTC+0300) Mogadishu, Somalia</option>
  <option value="Europe/Moscow">(UTC+0300) Moscow, Russia</option>
  <option value="Africa/Nairobi">(UTC+0300) Nairobi, Kenya</option>
  <option value="Asia/Qatar">(UTC+0300) Qatar</option>
  <option value="Asia/Riyadh">(UTC+0300) Riyadh, Saudi Arabia</option>
  <option value="Europe/Simferopol">(UTC+0300) Simferopol, Ukraine</option>
  <option value="Antarctica/Syowa">(UTC+0300) Syowa Station, Antarctica</option>
  <option value="Asia/Tehran">(UTC+0330) Tehran, Iran</option>
  <option value="Europe/Volgograd">(UTC+0400) Volgograd, Russia</option>
  <option value="Asia/Baku">(UTC+0400) Baku, Azerbaijan</option>
  <option value="Asia/Dubai">(UTC+0400) Dubai, United Arab Emirates</option>
  <option value="Indian/Mahe">(UTC+0400) Mahé, Seychelles</option>
  <option value="Indian/Mauritius">(UTC+0400) Mauritius</option>
  <option value="Asia/Muscat">(UTC+0400) Muscat, Oman</option>
  <option value="Indian/Reunion">(UTC+0400) Saint-Denis, Réunion</option>
  <option value="Europe/Samara">(UTC+0400) Samara, Russia</option>
  <option value="Asia/Tbilisi">(UTC+0400) Tbilisi, Georgia</option>
  <option value="Asia/Yerevan">(UTC+0400) Yerevan, Armenia</option>
  <option value="Asia/Kabul">(UTC+0430) Kabul, Afghanistan</option>
  <option value="Asia/Aqtau">(UTC+0500) Aktau, Kazakhstan</option>
  <option value="Asia/Aqtobe">(UTC+0500) Aktobe, Kazakhstan</option>
  <option value="Asia/Ashgabat">(UTC+0500) Ashgabat, Turkmenistan</option>
  <option value="Asia/Dushanbe">(UTC+0500) Dushanbe, Tajikistan</option>
  <option value="Asia/Karachi">(UTC+0500) Karachi, Pakistan</option>
  <option value="Indian/Kerguelen">(UTC+0500) Kerguelen Islands, French Southern and Antarctic Lands</option>
  <option value="Indian/Maldives">(UTC+0500) Maldives</option>
  <option value="Antarctica/Mawson">(UTC+0500) Mawson Station, Antarctica</option>
  <option value="Asia/Oral">(UTC+0500) Uralsk, Kazakhstan</option>
  <option value="Asia/Samarkand">(UTC+0500) Samarkand, Uzbekistan</option>
  <option value="Asia/Tashkent">(UTC+0500) Tashkent, Uzbekistan</option>
  <option value="Asia/Yekaterinburg">(UTC+0500) Yekaterinburg, Russia</option>
  <option value="Asia/Qyzylorda">(UTC+0500) Kyzylorda, Kazakhstan</option>
  <option value="Asia/Colombo">(UTC+0530) Colombo, Sri Lanka</option>
  <option value="Asia/Kolkata">(UTC+0530) Kolkata, India</option>
  <option value="Asia/Kathmandu">(UTC+0545) Kathmandu, Nepal</option>
  <option value="Asia/Almaty">(UTC+0600) Almaty, Kazakhstan</option>
  <option value="Asia/Bishkek">(UTC+0600) Bishkek, Kyrgyzstan</option>
  <option value="Indian/Chagos">(UTC+0600) Chagosøerne, British Indian Ocean Territory</option>
  <option value="Asia/Dhaka">(UTC+0600) Dhaka, Bangladesh</option>
  <option value="Asia/Omsk">(UTC+0600) Omsk, Russia</option>
  <option value="Asia/Thimphu">(UTC+0600) Thimphu, Bhutan</option>
  <option value="Asia/Urumqi">(UTC+0600) Urumqi, China</option>
  <option value="Antarctica/Vostok">(UTC+0600) Vostok Station, Antarctica</option>
  <option value="Indian/Cocos">(UTC+0630) Cocos (Keeling) Islands</option>
  <option value="Asia/Rangoon">(UTC+0630) Yangon, Myanmar</option>
  <option value="Asia/Novosibirsk">(UTC+0700) Novosibirsk, Russia</option>
  <option value="Asia/Bangkok">(UTC+0700) Bangkok, Thailand</option>
  <option value="Indian/Christmas">(UTC+0700) Christmas Island</option>
  <option value="Antarctica/Davis">(UTC+0700) Davis Station, Antarctica</option>
  <option value="Asia/Ho_Chi_Minh">(UTC+0700) Ho Chi Minh City, Vietnam</option>
  <option value="Asia/Hovd">(UTC+0700) Khovd, Mongolia</option>
  <option value="Asia/Jakarta">(UTC+0700) Jakarta, Indonesia</option>
  <option value="Asia/Krasnoyarsk">(UTC+0700) Krasnoyarsk, Russia</option>
  <option value="Asia/Novokuznetsk">(UTC+0700) Novokuznetsk, Russia</option>
  <option value="Asia/Phnom_Penh">(UTC+0700) Phnom Penh, Cambodia</option>
  <option value="Asia/Pontianak">(UTC+0700) Pontianak, Indonesia</option>
  <option value="Asia/Vientiane">(UTC+0700) Vientiane, Laos</option>
  <option value="Asia/Brunei">(UTC+0800) Brunei</option>
  <option value="Antarctica/Casey">(UTC+0800) Casey Station, Antarctica</option>
  <option value="Asia/Choibalsan">(UTC+0800) Choibalsan, Mongolia</option>
  <option value="Asia/Harbin">(UTC+0800) Harbin, China</option>
  <option value="Asia/Hong_Kong">(UTC+0800) Hong Kong</option>
  <option value="Asia/Irkutsk">(UTC+0800) Irkutsk, Russia</option>
  <option value="Asia/Kuala_Lumpur">(UTC+0800) Kuala Lumpur, Malaysia</option>
  <option value="Asia/Kuching">(UTC+0800) Kuching, Malaysia</option>
  <option value="Asia/Macau">(UTC+0800) Macau</option>
  <option value="Asia/Makassar">(UTC+0800) Makassar, Indonesia</option>
  <option value="Asia/Manila">(UTC+0800) Manila, Philippines</option>
  <option value="Australia/Perth">(UTC+0800) Perth, Australia</option>
  <option value="Asia/Shanghai">(UTC+0800) Shanghai, China</option>
  <option value="Asia/Singapore">(UTC+0800) Singapore</option>
  <option value="Asia/Taipei">(UTC+0800) Taipei, Taiwan</option>
  <option value="Asia/Ulaanbaatar">(UTC+0800) Ulaanbaatar, Mongolia</option>
  <option value="Australia/Eucla">(UTC+0845) Eucla, Australia</option>
  <option value="Asia/Chita">(UTC+0900) Chita, Russia</option>
  <option value="Asia/Pyongyang">(UTC+0900) Pyongyang, North Korea</option>
  <option value="Asia/Dili">(UTC+0900) Díli, Timor-Leste</option>
  <option value="Asia/Jayapura">(UTC+0900) Jayapura, Indonesia</option>
  <option value="Asia/Khandyga">(UTC+0900) Khandyga, Russia</option>
  <option value="Pacific/Palau">(UTC+0900) Palau</option>
  <option value="Asia/Seoul">(UTC+0900) Seoul, South Korea</option>
  <option value="Asia/Tokyo">(UTC+0900) Tokyo, Japan</option>
  <option value="Asia/Yakutsk">(UTC+0900) Yakutsk, Russia</option>
  <option value="Australia/Darwin">(UTC+0930) Darwin, Australia</option>
  <option value="Australia/Brisbane">(UTC+1000) Brisbane, Australia</option>
  <option value="Pacific/Chuuk">(UTC+1000) Chuuk, Federated States of Micronesia</option>
  <option value="Antarctica/DumontDUrville">(UTC+1000) Dumont d'Urville Station, Antarctica</option>
  <option value="Pacific/Guam">(UTC+1000) Guam</option>
  <option value="Australia/Lindeman">(UTC+1000) Lindeman Island, Australia</option>
  <option value="Pacific/Port_Moresby">(UTC+1000) Port Moresby, Papua New Guinea</option>
  <option value="Pacific/Saipan">(UTC+1000) Saipan, Northern Mariana Islands</option>
  <option value="Asia/Ust-Nera">(UTC+1000) Ust-Nera, Russia</option>
  <option value="Asia/Vladivostok">(UTC+1000) Vladivostok, Russia</option>
  <option value="Australia/Adelaide">(UTC+1030) Adelaide, Australia</option>
  <option value="Australia/Broken_Hill">(UTC+1030) Broken Hill, Australia</option>
  <option value="Asia/Magadan">(UTC+1100) Magadan, Russia</option>
  <option value="Asia/Sakhalin">(UTC+1100) Sakhalin, Russia</option>
  <option value="Australia/Lord_Howe">(UTC+1100) Lord Howe Island, Australia</option>
  <option value="Pacific/Bougainville">(UTC+1100) Bougainville Island, Papua New Guinea</option>
  <option value="Australia/Currie">(UTC+1100) Currie, Australia</option>
  <option value="Pacific/Efate">(UTC+1100) Efate, Vanuatu</option>
  <option value="Pacific/Guadalcanal">(UTC+1100) Guadalcanal, Solomon Islands</option>
  <option value="Australia/Hobart">(UTC+1100) Hobart, Australia</option>
  <option value="Pacific/Kosrae">(UTC+1100) Kosrae, Federated States of Micronesia</option>
  <option value="Antarctica/Macquarie">(UTC+1100) Macquarie Island, Australia</option>
  <option value="Australia/Melbourne">(UTC+1100) Melbourne, Australia</option>
  <option value="Pacific/Norfolk">(UTC+1100) Norfolk Island</option>
  <option value="Pacific/Noumea">(UTC+1100) Noumea, New Caledonia</option>
  <option value="Pacific/Pohnpei">(UTC+1100) Pohnpei, Federated States of Micronesia</option>
  <option value="Asia/Srednekolymsk">(UTC+1100) Srednekolymsk, Russia</option>
  <option value="Australia/Sydney">(UTC+1100) Sydney, Australia</option>
  <option value="Asia/Anadyr">(UTC+1200) Anadyr, Russia</option>
  <option value="Pacific/Funafuti">(UTC+1200) Funafuti, Tuvalu</option>
  <option value="Asia/Kamchatka">(UTC+1200) Kamchatka Peninsula, Russia</option>
  <option value="Pacific/Kwajalein">(UTC+1200) Kwajalein Atoll, Marshall Islands</option>
  <option value="Pacific/Majuro">(UTC+1200) Majuro, Marshall Islands</option>
  <option value="Pacific/Nauru">(UTC+1200) Nauru</option>
  <option value="Pacific/Tarawa">(UTC+1200) Tarawa Atoll, Kiribati</option>
  <option value="Pacific/Wake">(UTC+1200) Wake Island, United States</option>
  <option value="Pacific/Wallis">(UTC+1200) Wallis Island, Wallis and Futuna</option>
  <option value="Pacific/Fiji">(UTC+1200) Suva, Fiji</option>
  <option value="Pacific/Auckland">(UTC+1300) Auckland, New Zealand</option>
  <option value="Pacific/Enderbury">(UTC+1300) Enderbury Island, Kiribati</option>
  <option value="Pacific/Fakaofo">(UTC+1300) Fakaofo, Tokelau</option>
  <option value="Antarctica/McMurdo">(UTC+1300) McMurdo Station, Antarctica</option>
  <option value="Pacific/Tongatapu">(UTC+1300) Tongatapu, Tonga</option>
  <option value="Pacific/Chatham">(UTC+1345) Chatham Islands, New Zealand</option>
  <option value="Pacific/Apia">(UTC+1400) Apia, Samoa</option>
  <option value="Pacific/Kiritimati">(UTC+1400) Kiritimati, Kiribati</option>
</select>

Exec Time: 26.19 msec
*/

Get information on given time zone:

use peterkahl\timeZones\timeZones;

$temp = timeZones::getInfo('Africa/Sao_Tome');
var_dump($temp);

/*
array(4) {
  [0]=>
  string(15) "Africa/Sao_Tome"
  [1]=>
  int(0)
  [2]=>
  string(6) "+0000"
  [3]=>
  string(24) "São Tomé and Príncipe"
}
*/

$temp = timeZones::getInfo('Asia/Ulaanbaatar');
var_dump($temp);

/*
array(4) {
  [0]=>
  string(16) "Asia/Ulaanbaatar"
  [1]=>
  int(28800)
  [2]=>
  string(6) "+0800"
  [3]=>
  string(21) "Ulaanbaatar, Mongolia"
}
*/

Two alternative time zone libraries available!

I have created two alternative timezone libraries and you should consider using them.

This MySQL-based library is bit more complex, more versatile and more powerful:

https://github.com/peterkahl/TimeZoneCity

The other a replacement for the PHP date() function in that it provides timezone abbreviations and fully spelled out zone names:

https://github.com/peterkahl/WorldTime

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file timeZones.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:117
This week:0
All time:9,076
This week:326Up
 User Ratings  
 
 All time
Utility:58%StarStarStar
Consistency:58%StarStarStar
Documentation:58%StarStarStar
Examples:-
Tests:-
Videos:-
Overall:40%StarStarStar
Rank:2957