跳到主要內容

converttolocaltime - 指令碼與圖表函數

UTCGMT 時間戳記轉換為當地時間作為雙值。其中 place 可為全世界任何一個城市、地點及時區。 

Syntax:  

ConvertToLocalTime(timestamp [, place [, ignore_dst=false]])

Return data type: 雙值

Arguments:  

引數
引數 描述
timestamp 要轉換的時間戳記或解析為時間戳記的運算式。
place

下方有效地點及時區表格中的地點或時區。或者,您可以使用 GMTUTC 來定義當地時間。下列值及時間偏移範圍有效:

  • GMT
  • GMT-12:00 - GMT-01:00
  • GMT+01:00 - GMT+14:00
  • UTC
  • UTC-12:00 - UTC-01:00
  • UTC+01:00 - UTC+14:00
資訊備註您只能使用標準時間偏移。不能使用任意的時間偏移,例如,GMT-04:27
ignore_dst 如果您想要忽略 DST (日光節約時間),設為 True

產生的時間會根據日光節約時間進行調整,除非 ignore_dst 設為 True

有效的地點和時區
A-C D-K L-R S-Z
Abu Dhabi Darwin La Paz Samoa
Adelaide Dhaka Lima Santiago
Alaska Eastern Time (US & Canada) Lisbon Sapporo
Amsterdam Edinburgh Ljubljana Sarajevo
Arizona Ekaterinburg London Saskatchewan
Astana Fiji Madrid Seoul
Athens Georgetown Magadan Singapore
Atlantic Time (Canada) Greenland Mazatlan Skopje
Auckland Greenwich Mean Time : Dublin Melbourne Sofia
Azores Guadalajara Mexico City Solomon Is.
Baghdad Guam Mid-Atlantic Sri Jayawardenepura
Baku Hanoi Minsk St. Petersburg
Bangkok Harare Monrovia Stockholm
Beijing Hawaii Monterrey Sydney
Belgrade Helsinki Moscow Taipei
Berlin Hobart Mountain Time (US & Canada) Tallinn
Bern Hong Kong Mumbai Tashkent
Bogota Indiana (East) Muscat Tbilisi
Brasilia International Date Line West Nairobi Tehran
Bratislava Irkutsk New Caledonia Tokyo
Brisbane Islamabad New Delhi Urumqi
Brussels Istanbul Newfoundland Warsaw
Bucharest Jakarta Novosibirsk Wellington
Budapest Jerusalem Nuku'alofa West Central Africa
Buenos Aires Kabul Osaka Vienna
Cairo Kamchatka Pacific Time (US & Canada) Vilnius
Canberra Karachi Paris Vladivostok
Cape Verde Is. Kathmandu Perth Volgograd
Caracas Kolkata Port Moresby Yakutsk
Casablanca Krasnoyarsk Prague Yerevan
Central America Kuala Lumpur Pretoria Zagreb
Central Time (US & Canada) Kuwait Quito -
Chennai Kyiv Riga -
Chihuahua - Riyadh -
Chongqing - Rome -
Copenhagen - - -