I'm trying to get current user's regional settings.

var regionalSettings = context.Web.RegionalSettings works but there is no RegionalSettings on context.Web.CurrentUser.


What I end up doing-

I need the timezone to handle the dates of an upload file just after the upload. Since requesting current user's and web's TimeZone objects got pretty messy and took too much time I decided to conclude the time zone from file's modified property:

var fileModifiedDate = uploadedFile.ListItemAllFields.Modified; 
return Math.round(moment.utc(fileModifiedDate).diff(moment.utc(), 'hours', true));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.