Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to determine the localtime of a timestamp for different timezones?
    primarykey
    data
    text
    <p>I got UTC timestamps and want to display them for different timezones.</p> <p>Maybe an example can clarify what I am trying to do:</p> <p>Given the timestamp <code>1259431620000</code> those times should be displayed:</p> <blockquote> <p>Atlanta 13:07</p> <p>San Francisco 10:07</p> <p>London 17:07</p> <p>Sydney 04:07</p> </blockquote> <p>The cities might change but I guess you get what I am looking for.</p> <p>Is there a javascript library or a common solution that deals with the daylight saving?</p> <p>I all ready have a list of all the time zones.</p> <p><strong>As the daylight saving is an easy and common problem I thought there might be a library or a script dealing with them.</strong> </p> <p>Just in case you are interesting in the timezone table:</p> <pre><code>* GMT -11:00 o Apia o Midway o Niue o Pago Pago * GMT -10:00 o Fakaofo o Hawaii Time o Johnston o Rarotonga o Tahiti * GMT -09:00 o (GMT-09:30) Marquesas o Alaska Time o Gambier * GMT -08:00 o Pacific Time o Pacific Time - Tijuana o Pacific Time - Vancouver o Pacific Time - Whitehorse o Pitcairn * GMT -07:00 o Mountain Time - Dawson Creek o Mountain Time (America/Denver) o Mountain Time - Edmonton o Mountain Time - Hermosillo o Mountain Time - Chihuahua, Mazatlan o Mountain Time - Arizona o Mountain Time - Yellowknife * GMT -06:00 o Belize o Central Time o Costa Rica o El Salvador o Guatemala o Managua o Central Time - Mexico City o Central Time - Regina o Central Time (America/Tegucigalpa) o Central Time - Winnipeg o Easter Island o Galapagos * GMT -05:00 o Bogota o Cayman o Grand Turk o Guayaquil o Havana o Eastern Time - Iqaluit o Jamaica o Lima o Eastern Time - Montreal o Nassau o Eastern Time o Panama o Port-au-Prince o Eastern Time - Toronto * GMT -04:00 o (GMT-04:30) Caracas o Anguilla o Antigua o Aruba o Asuncion o Barbados o Boa Vista o Campo Grande o Cuiaba o Curacao o Dominica o Grenada o Guadeloupe o Guyana o Atlantic Time - Halifax o La Paz o Manaus o Martinique o Montserrat o Port of Spain o Porto Velho o Puerto Rico o Rio Branco o Santiago o Santo Domingo o St. Kitts o St. Lucia o St. Thomas o St. Vincent o Thule o Tortola o Palmer o Bermuda o Stanley * GMT -03:00 o Newfoundland Time - St. Johns o Araguaina o Buenos Aires o Salvador o Belem o Cayenne o Fortaleza o Godthab o Maceio o Miquelon o Montevideo o Paramaribo o Recife o Sao Paulo o Rothera * GMT -02:00 o Noronha o South Georgia * GMT -01:00 o Scoresbysund o Azores o Cape Verde o Abidjan * GMT 00:00 o Accra o Bamako o Banjul o Bissau o Casablanca o Conakry o Dakar o El Aaiun o Freetown o Lome o Monrovia o Nouakchott o Ouagadougou o Sao Tome o Danmarkshavn o Canary Islands o Faeroe o Reykjavik o St Helena o GMT (no daylight saving) o Dublin o Lisbon o London * GMT +01:00 o Algiers o Bangui o Brazzaville o Ceuta o Douala o Kinshasa o Lagos o Libreville o Luanda o Malabo o Ndjamena o Niamey o Porto-Novo o Tunis o Windhoek o Amsterdam o Andorra o Central European Time o Berlin o Brussels o Budapest o Copenhagen o Gibraltar o Luxembourg o Madrid o Malta o Monaco o Oslo o Paris o Rome o Stockholm o Tirane o Vaduz o Vienna o Warsaw o Zurich * GMT +02:00 o Blantyre o Bujumbura o Cairo o Gaborone o Harare o Johannesburg o Kigali o Lubumbashi o Lusaka o Maputo o Maseru o Mbabane o Tripoli o Amman o Beirut o Damascus o Gaza o Jerusalem o Nicosia o Athens o Bucharest o Chisinau o Helsinki o Istanbul o Moscow-01 - Kaliningrad o Kiev o Minsk o Riga o Sofia o Tallinn o Vilnius * GMT +03:00 o Addis Ababa o Asmera o Dar es Salaam o Djibouti o Kampala o Khartoum o Mogadishu o Nairobi o Syowa o Aden o Baghdad o Bahrain o Kuwait o Qatar o Riyadh o Moscow+00 o Antananarivo o Comoro o Mayotte o (GMT+03:30) Tehran * GMT +04:00 o Baku o Dubai o Muscat o Tbilisi o Yerevan o Moscow+01 - Samara o Mahe o Mauritius o Reunion o (GMT+04:30) Kabul * GMT +05:00 o Aqtau o Aqtobe o Ashgabat o Dushanbe o Karachi o Tashkent o Moscow+02 - Yekaterinburg o Kerguelen o Maldives o (GMT+05:30) India Standard Time o (GMT+05:30) Colombo o (GMT+05:45) Katmandu * GMT +06:00 o Mawson o Vostok o Almaty o Bishkek o Dhaka o Moscow+03 - Omsk, Novosibirsk o Thimphu o Chagos o (GMT+06:30) Rangoon o (GMT+06:30) Cocos * GMT +07:00 o Davis o Bangkok o Hovd o Jakarta o Moscow+04 - Krasnoyarsk o Phnom Penh o Hanoi o Vientiane o Christmas * GMT +08:00 o Casey o Brunei o Choibalsan o Hong Kong o Moscow+05 - Irkutsk o Kuala Lumpur o Macau o Makassar o Manila o China Time - Beijing o Singapore o Taipei o Ulaanbaatar o Western Time - Perth * GMT +09:00 o Dili o Jayapura o Pyongyang o Seoul o Tokyo o Moscow+06 - Yakutsk o Palau o (GMT+09:30) Central Time - Adelaide o (GMT+09:30) Central Time - Darwin * GMT +10:00 o Dumont D'Urville o Moscow+07 - Yuzhno-Sakhalinsk o Eastern Time - Brisbane o Eastern Time - Hobart o Eastern Time - Melbourne, Sydney o Guam o Port Moresby o Saipan o Truk * GMT +11:00 o Moscow+08 - Magadan o Efate o Guadalcanal o Kosrae o Noumea o Ponape o (GMT+11:30) Norfolk * GMT +12:00 o Moscow+09 - Petropavlovsk-Kamchatskiy o Auckland o Fiji o Funafuti o Kwajalein o Majuro o Nauru o Tarawa o Wake o Wallis * GMT +13:00 o Enderbury o Tongatapu o Kiritimati </code></pre> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload