跳到主要内容

converttolocaltime - 脚本和图表函数

UTCGMT 时间戳转换为本地时间作为对偶值。此地方可为全世界任何一个城市,地方和时区。 

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 - - -