karlenigma
09/17/2021, 11:54 AM2001-5-29
in a string and then use new Date('2001-5-29')
then set the value to a date field in NetSuite. Then when viewing the record in NetSuite after saving the record the date ends up being 28/05/2001
. This is happening when using new Date
and when using format.parse
. It is mighty mighty strange. FYI this is running in a Map/Reduce.battk
09/17/2021, 11:59 AMbattk
09/17/2021, 12:00 PMkarlenigma
09/17/2021, 12:01 PMkarlenigma
09/17/2021, 12:01 PMbattk
09/17/2021, 12:02 PMbattk
09/17/2021, 12:02 PMkarlenigma
09/17/2021, 12:03 PMkarlenigma
09/17/2021, 12:04 PMbattk
09/17/2021, 12:04 PMbattk
09/17/2021, 12:05 PMkarlenigma
09/17/2021, 12:06 PM"2001-05-29T00:00:00.000Z"
to a date field. Netsuite will then change my date to the day before?battk
09/17/2021, 12:07 PMkarlenigma
09/17/2021, 12:07 PMbattk
09/17/2021, 12:08 PMkarlenigma
09/17/2021, 12:10 PMbattk
09/17/2021, 12:10 PMnew Date("2001-05-29T00:00:00.000Z")
will create a Date whose string output looks like Mon May 28 2001 17:00:00 GMT-0700 (Pacific Daylight Time)
battk
09/17/2021, 12:11 PMbattk
09/17/2021, 12:12 PMkarlenigma
09/17/2021, 12:12 PMbattk
09/17/2021, 12:13 PMbattk
09/17/2021, 12:13 PMbattk
09/17/2021, 12:13 PMkarlenigma
09/17/2021, 12:13 PMkarlenigma
09/17/2021, 12:14 PMbattk
09/17/2021, 12:14 PMbattk
09/17/2021, 12:14 PMkarlenigma
09/17/2021, 12:15 PMbattk
09/17/2021, 12:23 PM2001-05-29T00:00:00.000Z
and 2001-05-28T17:00:00.000-07:00
represent the same Datekarlenigma
09/17/2021, 12:26 PMkarlenigma
09/17/2021, 12:26 PMbattk
09/17/2021, 12:26 PMbattk
09/17/2021, 12:27 PMkarlenigma
09/17/2021, 12:27 PM