i am in india .. my netsuite acc is configured for...
# suitescript
r
i am in india .. my netsuite acc is configured for US (GMT-07:00) Mounta...ime (US & Canada) at company and user level checked and it shows me 10.25am for logs inserted and when i do simply new Date( ) i shows a SIX hour difference .. 4.25 pm why???
c
function getTodayInCurrentUserTimezone() {
const TODAY_AS_DATE = new Date(); const FORMATTED_TODAY_AS_DATE = format.format({type: format.Type.DATETIME, value: TODAY_AS_DATE}); const PARSED_TODAY_AS_DATE = format.parse({type: format.Type.DATE, value: new Date(FORMATTED_TODAY_AS_DATE)}); return PARSED_TODAY_AS_DATE; }
🤮 1