Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Timezones in 2.0
var localDate = format.format({value:new Date(), type: format.Type.DATETIMETZ, timezone: format.Timezone.AMERICA_CHICAGO})
log.debug("new date ",localDate) -> 10/1/2017 8:57:29 pm
so far so good the right date string is displayed
let's convert it to a date object as per suiteanswer https://netsuite.custhelp.com/app/answers/detail/a_id/61223
var localDateObj = format.parse({value:localDate, type: format.Type.DATETIME, timezone: format.Timezone.AMERICA_CHICAGO})
log.debug("new date 2",localDateObj) -> 2017-10-02T01:57:29.000Z
ok didnt work lets try
var localDateObj = format.parse({value:localDate, type: format.Type.DATETIMETZ, timezone: format.Timezone.AMERICA_CHICAGO})
log.debug("new date 2",localDateObj) -> 2017-10-02T01:57:29.000Z