angrycrab
angrycrab

Reputation: 860

Passing Date value to NetSuite via API

When populating a date field in NetSuite via the API (e.g Sales Order start date), you are required to specify a timestamp + timezone, even though the timestamp isn't shown in NetSuite.

Does anyone know the logic NetSuite is using to covert a date+timestamp to a date?

For example, sometimes when I pass a date+time of Oct 1 2016 00:00:00 UTC, I see Sept 30 2016 in NetSuite. Other times, I see the date appear as Oct 1 2016 in NetSuite. The logic seems inconsistent. Can anyone explain the logic?

Upvotes: 1

Views: 1327

Answers (2)

tt_emrah
tt_emrah

Reputation: 1053

the date you submitted is converted from logged-in user's timezone, to server's timezone. it's saved with the server timezone.

so depending on the difference between timezones of session user and server, yes it can even change the date by conversion.

Upvotes: 0

w3bguy
w3bguy

Reputation: 2250

For me it depended on my timezone, and the timezone of the account that was writing to NetSuite.

I had this issue in the past. I resolved it by setting my Integration user account to have GMT timezone. After that, the dates/times have always appeared correct for each user, based on their timezone (set in preferences).

Upvotes: 0

Related Questions