Scenario
A developer uses the JavaScript Object new Date() when setting date field values via SuiteScript and is uncertain of the timezone being used by the API.
Solution
The date and time that is set to fields accepting new Date() varies depending on the current timezone set on the local computer it is running on. So in order to determine the timezone that this API uses, the developer needs to consider the following:
- Since server-side scripts run on NetSuite servers, new Date() follows NetSuite servers’ local time. Examples of server-side script types include User Event, Scheduled, and Suitelet scripts.
- NetSuite servers always use Pacific Time.
- Client Script types run on the user’s browser.