I'm saving a timeofday value, server side everythi...
# suitescript
a
I'm saving a timeofday value, server side everything is correct but, client side it's a different time? is there any solution?(timeofday field)
b
code?
a
Copy code
new Date(Date.UTC(parseInt(Y), parseInt(M) - 1, parseInt(D), startHour, startMinute))
"2019-12-19T123000.000Z" this is the debug for the line but it will sho another time in client side, which is the US time.
b
Use N/format to format a date into a string in the proper timezone
you might need to split a datetime string into its date and time components to use with a time of day
s
if by 'client side' you mean running that code in your browser then yes you should expect the date/time to be potentially different. This is because the
Date
in your browser is tied to your computer's locale.
Date
serverside in NetSuite is not.