Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Is anyone else getting different results from format.format DATETIMEZ sporadically?
I'm running a SuiteScript 2.0 script that is using the following javascript code to get the current date/time stamp factoring in time zone. However I have found that when this code runs that it does not always return the same format, on rare occasions it is returning an unexpected/unpredictable date/time formatted values. To test I ran the below code on a schedule and output results to the log, it can take several hours/days but eventually this code eventually returns unexpected values.
JavaScript code I am running:
var now = new Date();
var currentDateZoned = format.format( { value:now, type:format.Type.DATETIMETZ } );
0