javascriptCopy codedefine([‘N/format/i18n’, ‘N/runtime’], function (formatI18n, runtime) { function getFormattedDate() { try { // Get the user’s timezone dynamicallyvar userTimezone = runtime.getCurrentUser().getPreference(‘TIMEZONE’); log.debug(“User Timezone”, userTimezone); // This will show the user’s timezone like “America/New_York”// Get the current datevar currentDate = new Date(); // Format the date using the user’s timezone with the i18n modulevar formattedDate =… Continue reading How to use N/format/i18n for Date Formatting in User’s Timezone
Tag: time format
Get Time Format From Set Preferences Page via SuiteScript
User wants to get the Time Format from the Set Preferences page using SuiteScript 2.X