converttolocaltime - script and chart function
Converts a UTC or GMT timestamp to local time as a dual value. The place can be any of a number of cities, places and time zones around the world.
Syntax:
ConvertToLocalTime(timestamp [, place [, ignore_dst=false]])
Return data type: dual
Arguments:
Argument | Description |
---|---|
timestamp | The timestamp, or expression resolving to a timestamp, to convert. |
place |
A place or timezone from the table of valid places and timezones below. Alternatively, you can use GMT or UTC to define the local time. The following values and time offset ranges are valid:
Information noteYou can only use standard time offsets. It's not possible to use an arbitrary time offset, for example, GMT-04:27.
|
ignore_dst |
Set to True to ignore DST (daylight saving time). Set to False to adjust for daylight saving time. |
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 | - | - | - |