I am creating a custom data entry app in sharepoint using the CSOM. I need to update the default value of a datetime field, I can get the default value but the datetime is in UTC Format.
I need to convert it to whatever format the sharepoint server uses. I have tried using the SP.Web.RegionalSettings.get_Dateformat() method like so:
var context = SP.ClientContext.get_current();
regionalsettings = context.get_web().get_regionalSettings(); //global variable
context.load(regionalsettings);
context.executeQueryAsync(configLoaded, configFailed);
....
function configLoaded(){
var dateformat = regionalsettings.get_dateFormat();
but this just returns a 0 value every time