Modules

filter

 

Objects/Functions

module (N/format)

SuiteScript 2.0

format.Timezone

{format}.Timezone{1: {ETC_GMT_PLUS_12: 'Etc/GMT+12'},2: {PACIFIC_SAMOA: 'Pacific/Samoa'},3: {PACIFIC_HONOLULU: 'Pacific/Honolulu'},4: {AMERICA_ANCHORAGE: 'America/Anchorage'},5: {AMERICA_LOS_ANGELES: 'America/Los_Angeles'},6: ${7:AMERICA_TIJUANA: 'America/Tijuana'},7: ${8:AMERICA_DENVER: 'America/Denver'},8: ${9:AMERICA_PHOENIX: 'America/Phoenix'},9: {0:AMERICA_CHIHUAHUA: 'America/Chihuahua'},10: {1:AMERICA_CHICAGO: 'America/Chicago'},11: {2:AMERICA_REGINA: 'America/Regina'},12: {3:AMERICA_GUATEMALA: 'America/Guatemala'},13: {4:AMERICA_MEXICO_CITY: 'America/Mexico_City’},14: {5:AMERICA_NEW_YORK: 'America/New_York'},15: {6:US_EAST_INDIANA: 'US/East-Indiana'},16: {7:AMERICA_BOGOTA: 'America/Bogota'},17: {8:AMERICA_CARACAS: 'America/Caracas'},18: {9:AMERICA_HALIFAX: 'America/Halifax'},19: {0:AMERICA_LA_PAZ: 'America/La_Paz'},20: {1:AMERICA_MANAUS: 'America/Manaus'},21: {2:AMERICA_SANTIAGO: 'America/Santiago'},22: {3:AMERICA_ST_JOHNS: 'America/St_Johns'},23: {4:AMERICA_SAO_PAULO: 'America/Sao_Paulo'},24: {5:AMERICA_BUENOS_AIRES: 'America/Buenos_Aires'},25: {6:ETC_GMT_PLUS_3: 'Etc/GMT+3'},26: {7:AMERICA_GODTHAB: 'America/Godthab'},27: {8:AMERICA_MONTEVIDEO: 'America/Montevideo'},28: {9:AMERICA_NORONHA: 'America/Noronha'},29: {0:ETC_GMT_PLUS_1: 'Etc/GMT+1'},30: {1:ATLANTIC_AZORES: 'Atlantic/Azores'},31: {2:EUROPE_LONDON: 'Europe/London', GMT: 'GMT'},32: {3:GMT: 'GMT'},33: {4:ATLANTIC_REYKJAVIK: 'Atlantic/Reykjavik'},34: {5:EUROPE_WARSAW: 'Europe/Warsaw'},35: {6:EUROPE_PARIS: 'Europe/Paris'},36: {7:ETC_GMT_MINUS_1: 'Etc/GMT-1'},37: {8:EUROPE_AMSTERDAM: 'Europe/Amsterdam'},38: {9:EUROPE_BUDAPEST: 'Europe/Budapest'},39: {0:AFRICA_CAIRO: 'Africa/Cairo'},40: {1:EUROPE_ISTANBUL: 'Europe/Istanbul'},41: {2:ASIA_JERUSALEM: 'Asia/Jerusalem'},42: {3:ASIA_AMMAN: 'Asia/Amman'},43: {4:ASIA_BEIRUT: 'Asia/Beirut'},44: {5:AFRICA_JOHANNESBURG: 'Africa/Johannesburg'},45: {6:EUROPE_KIEV: 'Europe/Kiev'},46: {7:EUROPE_MINSK: 'Europe/Minsk'},47: {8:AFRICA_WINDHOEK: 'Africa/Windhoek'},48: {9:ASIA_RIYADH: 'Asia/Riyadh'},49: {0:EUROPE_MOSCOW: 'Europe/Moscow'},50: {1:ASIA_BAGHDAD: 'Asia/Baghdad'},51: {2:AFRICA_NAIROBI: 'Africa/Nairobi'},52: {3:ASIA_TEHRAN: 'Asia/Tehran'},53: {4:ASIA_MUSCAT: 'Asia/Muscat'},54: {5:ASIA_BAKU: 'Asia/Baku'},55: {6:ASIA_YEREVAN: 'Asia/Yerevan'},56: {7:ETC_GMT_MINUS_3: 'Etc/GMT-3'},57: {8:ASIA_KABUL: 'Asia/Kabul'},58: {9:ASIA_KARACHI: 'Asia/Karachi'},59: {0:ASIA_YEKATERINBURG: 'Asia/Yekaterinburg'},60: {1:ASIA_TASHKENT: 'Asia/Tashkent'},61: {2:ASIA_CALCUTTA: 'Asia/Calcutta'},62: {3:ASIA_KATMANDU: 'Asia/Katmandu'},63: {4:ASIA_ALMATY: 'Asia/Almaty'},64: {5:ASIA_DHAKA: 'Asia/Dhaka'},65: {6:ASIA_RANGOON: 'Asia/Rangoon'},66: {7:ASIA_BANGKOK: 'Asia/Bangkok'},67: {8:ASIA_KRASNOYARSK: 'Asia/Krasnoyarsk'},68: {9:ASIA_HONG_KONG: 'Asia/Hong_Kong'},69: ${70:ASIA_KUALA_LUMPUR: 'Asia/Kuala_Lumpur'},70: ${71:ASIA_TAIPEI: 'Asia/Taipei'},71: ${72:AUSTRALIA_PERTH: 'Australia/Perth'},72: ${73:ASIA_IRKUTSK: 'Asia/Irkutsk'},73: ${74:ASIA_MANILA: 'Asia/Manila'},74: ${75:ASIA_SEOUL: 'Asia/Seoul'},75: ${76:ASIA_TOKYO: 'Asia/Tokyo'},76: ${77:ASIA_YAKUTSK: 'Asia/Yakutsk'},77: ${78:AUSTRALIA_DARWIN: 'Australia/Darwin'},78: ${79:AUSTRALIA_ADELAIDE: 'Australia/Adelaide'},79: ${80:AUSTRALIA_SYDNEY: 'Australia/Sydney'},80: ${81:AUSTRALIA_BRISBANE: 'Australia/Brisbane'},81: ${82:AUSTRALIA_HOBART: 'Australia/Hobart'},82: ${83:PACIFIC_GUAM: 'Pacific/Guam'},83: ${84:ASIA_VLADIVOSTOK: 'Asia/Vladivostok'},84: ${85:ASIA_MAGADAN: 'Asia/Magadan'},85: ${86:PACIFIC_KWAJALEIN: 'Pacific/Kwajalein'},86: ${87:PACIFIC_AUCKLAND: 'Pacific/Auckland'},87: ${88:PACIFIC_TONGATAPU: 'Pacific/Tongatapu'}})

N/format Module
format.Timezone
Enum Description: Enumeration that holds the string values for supported time zone formats. This enum is used to set the value of the options.timezone parameter when calling format.format(options) or format.parse(options).
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types
Module: N/format Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=format.Timezone

Example:

// Code Example 1
// Add additional code
//...
var date = new Date(); //Mon Aug 24 2015 17:27:16 GMT-0700 (Pacific Daylight Time)
var TOKYO = format.format({
value: date,
type: format.Type.DATETIME,
timezone: format.Timezone.ASIA_TOKYO
}); //Returns "8/25/2015 9:27:16 am"

var NEWYORK = format.format({
value: date,
type: format.Type.DATETIME,
timezone: format.Timezone.AMERICA_NEW_YORK
}); //Returns "8/24/2015 8:27:16 pm"

var dateStr = "03/17/2015 09:00:00 pm"
var TOKYO_2 = format.parse({
value: dateStr,
type: format.Type.DATETIME,
timezone: format.Timezone.ASIA_TOKYO
}); //Returns Date object [[ Tue Mar 17 2015 05:00:00 GMT-0700 (PDT) ]]

var NEWYORK_2 = format.parse({
value: dateStr,
type: format.Type.DATETIME,
timezone: format.Timezone.AMERICA_NEW_YORK
}); //Returns Date object [[ Tue Mar 17 2015 18:00:00 GMT-0700 (PDT) ]]
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4407050795.html