Skip to content

Instantly share code, notes, and snippets.

@nodesocket
Created October 19, 2012 16:33
Show Gist options
  • Save nodesocket/3919205 to your computer and use it in GitHub Desktop.
Save nodesocket/3919205 to your computer and use it in GitHub Desktop.
All world timezones in an HTML select element
<select name="timezone_offset" id="timezone-offset" class="span5">
<option value="-12:00">(GMT -12:00) Eniwetok, Kwajalein</option>
<option value="-11:00">(GMT -11:00) Midway Island, Samoa</option>
<option value="-10:00">(GMT -10:00) Hawaii</option>
<option value="-09:50">(GMT -9:30) Taiohae</option>
<option value="-09:00">(GMT -9:00) Alaska</option>
<option value="-08:00">(GMT -8:00) Pacific Time (US &amp; Canada)</option>
<option value="-07:00">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
<option value="-06:00">(GMT -6:00) Central Time (US &amp; Canada), Mexico City</option>
<option value="-05:00">(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima</option>
<option value="-04:50">(GMT -4:30) Caracas</option>
<option value="-04:00">(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz</option>
<option value="-03:50">(GMT -3:30) Newfoundland</option>
<option value="-03:00">(GMT -3:00) Brazil, Buenos Aires, Georgetown</option>
<option value="-02:00">(GMT -2:00) Mid-Atlantic</option>
<option value="-01:00">(GMT -1:00) Azores, Cape Verde Islands</option>
<option value="+00:00" selected="selected">(GMT) Western Europe Time, London, Lisbon, Casablanca</option>
<option value="+01:00">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
<option value="+02:00">(GMT +2:00) Kaliningrad, South Africa</option>
<option value="+03:00">(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg</option>
<option value="+03:50">(GMT +3:30) Tehran</option>
<option value="+04:00">(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi</option>
<option value="+04:50">(GMT +4:30) Kabul</option>
<option value="+05:00">(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
<option value="+05:50">(GMT +5:30) Bombay, Calcutta, Madras, New Delhi</option>
<option value="+05:75">(GMT +5:45) Kathmandu, Pokhara</option>
<option value="+06:00">(GMT +6:00) Almaty, Dhaka, Colombo</option>
<option value="+06:50">(GMT +6:30) Yangon, Mandalay</option>
<option value="+07:00">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
<option value="+08:00">(GMT +8:00) Beijing, Perth, Singapore, Hong Kong</option>
<option value="+08:75">(GMT +8:45) Eucla</option>
<option value="+09:00">(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk</option>
<option value="+09:50">(GMT +9:30) Adelaide, Darwin</option>
<option value="+10:00">(GMT +10:00) Eastern Australia, Guam, Vladivostok</option>
<option value="+10:50">(GMT +10:30) Lord Howe Island</option>
<option value="+11:00">(GMT +11:00) Magadan, Solomon Islands, New Caledonia</option>
<option value="+11:50">(GMT +11:30) Norfolk Island</option>
<option value="+12:00">(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka</option>
<option value="+12:75">(GMT +12:45) Chatham Islands</option>
<option value="+13:00">(GMT +13:00) Apia, Nukualofa</option>
<option value="+14:00">(GMT +14:00) Line Islands, Tokelau</option>
</select>
@mcgingras
Copy link

I found this list extremely valuable thanks please do not delete

@tranchausky
Copy link

tranchausky commented Mar 3, 2023

php code :D

define('TIME_ZONE', [
    '-12:00' => '(GMT -12:00) Eniwetok, Kwajalein',
    '-11:00' => '(GMT -11:00) Midway Island, Samoa',
    '-10:00' => '(GMT -10:00) Hawaii',
    '-09:30' => '(GMT -9:30) Taiohae',
    '-09:00' => '(GMT -9:00) Alaska',
    '-08:00' => '(GMT -8:00) Pacific Time (US & Canada)',
    '-07:00' => '(GMT -7:00) Mountain Time (US & Canada)',
    '-06:00' => '(GMT -6:00) Central Time (US & Canada), Mexico City',
    '-05:00' => '(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima',
    '-04:30' => '(GMT -4:30) Caracas',
    '-04:00' => '(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz',
    '-03:30' => '(GMT -3:30) Newfoundland',
    '-03:00' => '(GMT -3:00) Brazil, Buenos Aires, Georgetown',
    '-02:00' => '(GMT -2:00) Mid-Atlantic',
    '-01:00' => '(GMT -1:00) Azores, Cape Verde Islands',
    '+00:00' => '(GMT) Western Europe Time, London, Lisbon, Casablanca',
    '+01:00' => '(GMT +1:00) Brussels, Copenhagen, Madrid, Paris',
    '+02:00' => '(GMT +2:00) Kaliningrad, South Africa',
    '+03:00' => '(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg',
    '+03:30' => '(GMT +3:30) Tehran',
    '+04:00' => '(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi',
    '+04:30' => '(GMT +4:30) Kabul',
    '+05:00' => '(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent',
    '+05:30' => '(GMT +5:30) Bombay, Calcutta, Madras, New Delhi',
    '+05:45' => '(GMT +5:45) Kathmandu, Pokhara',
    '+06:00' => '(GMT +6:00) Almaty, Dhaka, Colombo',
    '+06:30' => '(GMT +6:30) Yangon, Mandalay',
    '+07:00' => '(GMT +7:00) Bangkok, Hanoi, Jakarta',
    '+08:00' => '(GMT +8:00) Beijing, Perth, Singapore, Hong Kong',
    '+08:45' => '(GMT +8:45) Eucla',
    '+09:00' => '(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk',
    '+09:30' => '(GMT +9:30) Adelaide, Darwin',
    '+10:00' => '(GMT +10:00) Eastern Australia, Guam, Vladivostok',
    '+10:30' => '(GMT +10:30) Lord Howe Island',
    '+11:00' => '(GMT +11:00) Magadan, Solomon Islands, New Caledonia',
    '+11:30' => '(GMT +11:30) Norfolk Island',
    '+12:00' => '(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka',
    '+12:45' => '(GMT +12:45) Chatham Islands',
    '+13:00' => '(GMT +13:00) Apia, Nukualofa',
    '+14:00' => '(GMT +14:00) Line Islands, Tokelau',
]);

@Simvolick
Copy link

This is extremely appreciated.

@epursimuove
Copy link

epursimuove commented May 19, 2023

Warning! Please, do not use lists like this when trying to work correctly with time zones.

This is not a list of "All world timezones". It is not a complete list. It is not even time zones, just random values that may look like time zones, but are so far away from real time zones. Time zones can not be simplified to hardcoded lists like this.

Using lists similar to this for representing time zones will always fail.

Please read the important points in the comment from mattjohnsonpint (from 2017).

@dorogoff
Copy link

Yeah, @epursimuove is right, because eg (GMT -5:00) Eastern Time (US & Canada), Bogota, Lima is not true,
because Eastern Time in common has daylight saving time EST/EDT, but Bogota and Lima doesn't observe daylight time

@vreemt
Copy link

vreemt commented Apr 25, 2024

echoing the "this list is wrong" comments
I'm in the UK, and we're not on GMT at the moment, GMT is 12:15 and it's currently 13:15, or BST, or UTC+1, or GMT+1 here. Daylight savings time in the UK started on the same date as "Most European countries", 31 March 2024.

As another example of why not to use a hardcoded or a simplified list...

Amsterdam is currently using CEST, or Central European Summer Time, or UTC+2 (Daylight savings started there on 31 March 2024). Right now, it the same time in Amsterdam, The Netherlands as in Harare, Zimbabwe, which currently observes Central Africa Time (CAT) all year. IST (Israel Standard Time) is also UTC+2, but not currently observed, because Israel is on Daylight Savings time (UTC+3, which started on 29 March 2024). Not to be confused with IST – Irish Standard Time (UTC+1) or IST – Indian Standard Time (UTC+5:30). Also note a lot of these place names aren't in the lists above (Amsterdam, Harare, Zimbabwe, Israel, Ireland, India).

if you're looking for actual timezones, try https://en.wikipedia.org/wiki/List_of_tz_database_time_zones which is based on the IANA standards

and for a shorter, more textual version https://www.timeanddate.com/time/current-number-time-zones.html (there's 38 for today, 25 April 2024)

I'm currently making a spreadsheet to help me get a time zone list for use with a summer events form, using different resources, and starting at the top (UTC +14), I've already found the following

Short description notes
TOST Tonga daylight savings (UTC +14) no longer in use since 2019
LINT UTC-10 Pacific Line Islands UTC +14 in use since 1994
NZDT New Zealand Daylight Time (UTC +13) used in NZ and Antarctica summers, from 29 Sep 2024. from Apr-Sep use NZST (UTC +12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment