New answers tagged

0

You can use the SP.RegionalSettings.timeZone property from sp.js to get the server timezone. The LCID for the current context can be gotten directly from 2 variables: //as an int var lcid =_spPageContextInfo.currentLanguage; // or as a string var lcid = SP.Res.lcid;


0

I don't have privileges to comment so adding it as an answer. SharePoint stores the dates internally as UTC, so when you add any data you need to manually convert the time to UTC otherwise when added from a different time zone you'll always see a time difference.


0

You can use the JavaScript methods like getUSTDate(), getUSTHour(), getUSTMinute(), getUSTMinute() to Get the Current UST date and Time. Please refer the Link Or you have to convert it manually using the below code function convertToServerTimeZone(){ //EST offset = -5.0 clientDate = new Date(); utc = clientDate.getTime() + ...



Top 50 recent answers are included