Tag Info

New answers tagged

0

Vadim Gremyachev posted almost right solution, but it is lacking, because the SPWeb object still keeps current users language settings. After some experimentations with objects and powershell, I remembered that SPSecurity.RunWithElevatedPrivileges opens web as administrator and uses default settings (language as well), so I wrapped Vadim Gremyachev code in ...


2

SPRegionalSettings.TimeZone property gets the time zone that is used on the SharePoint server. Example using (var site = new SPSite(siteUrl)) { using (var web = site.OpenWeb()) { var regionalSettings = web.RegionalSettings; var tz = regionalSettings.TimeZone; Console.WriteLine(tz.Description); } }


0

My final code for getting correct LCID: RegionalSettings _regionalSettings; PersonProperties _userProfile; public PersonProperties UserProfile { get { if (_userProfile == null) { var peopleManager = new PeopleManager(_clientContext); _userProfile = ...



Top 50 recent answers are included