Alex Pilgun
04/18/2022, 10:44 PMWhen getting the date field through SOAP web services, your preferred time zone influences the resulting datetime. Midnight in the user's time zone of the stored date (which is also displayed in the UI) is converted to Pacific Standard Time (PST) or Pacific Daylight Time (PDT), and sent to the SOAP web services user.Ok, that was easy (before daylight savings started): • API user's timezone is GMT. • Netsuite UI date = 2022-04-18 • Netsuite SOAP date value = 2022-04-17T160000.000-08:00 Totally makes sense, since this is converted to 2022-04-18T000000.000Z and I get the expected date part of 2022-04-18. Quote #2 from the same article:
The NetSuite time zone settings in Home > Set Preferences are based on standard time settings. You must keep in mind the required adjustments during daylight saving time in the year. For example, if your time zone setting in shows (GMT-06:00) Central Time (US & Canada), this is perceived as -05:00 in SOAP web services context during daylight saving time, but -06:00 in standard time.
Therefore, if you send a SOAP web services request indicating CST (-6) when daylight saving time is in effect, as in the following example: <tranDate xsi:type="xsd:dateTime">2015-04-13T222626.923-06:00</tranDate>, the datetime field on the target record is set using CDT (-5) i.e.232626.923 instead of the intended 222626.923.
Important: If the time is close to midnight, the date may change to the next day after the conversion.With the same API user with GMT timezone and same Netsuite UI date = 2022-04-18 I now receive in SOAP 2022-04-17T160000.000*-07:00* instead of -08:00. By taking the date part this actually converts to 2022-04-1*7* instead of expected 2022-04-1*8* in GMT. Just..why does this happen? And how Netsuite suggests to work with this? Does the bold sentences in quote #2 imply that my client code needs to remember when daylight savings are in effect in my timezone and to account for that 1 hour difference somehow? Am I missing something?
battk
04/18/2022, 11:07 PMbattk
04/18/2022, 11:07 PMbattk
04/18/2022, 11:09 PMbattk
04/18/2022, 11:12 PMbattk
04/18/2022, 11:15 PMbattk
04/18/2022, 11:15 PMbattk
04/18/2022, 11:17 PMbattk
04/18/2022, 11:18 PMbattk
04/18/2022, 11:25 PMbattk
04/18/2022, 11:25 PMbattk
04/18/2022, 11:27 PMbattk
04/18/2022, 11:28 PMbattk
04/18/2022, 11:29 PMbattk
04/18/2022, 11:31 PMMike Robbins
04/19/2022, 12:47 PMAlex Pilgun
04/19/2022, 10:49 PMbattk
04/19/2022, 11:05 PMbattk
04/19/2022, 11:06 PM