Tag Info

Hot answers tagged

4

For full explanation see Dealing with Multiple Time Zones in SharePoint 2010 var user = SPContext.Current.Web.CurrentUser; // Always perform a Null-Check on SPUser.RegionalSettings if (user.RegionalSettings != null) { return user.RegionalSettings.TimeZone.UTCToLocalTime(listDateUtc); } else { // User didn't set a time zone, so use the one from the ...


3

I tried it out on my Sharepoint environment. If I choose as the Regional Setting Malay (Brunei Darussalam), the accepted decimal separator is the "." (dot). If I choose Malay (Malaysia), the accepted decimal separator is the "," (comma). So I think you just have to choose the other Malay regional setting. No IIS reset was needed in my tests. I hope it ...


2

I don't think it's possible. You could create a webcontrol which shows the date like you want it. In case of a date in a list, you should use a content query webpart with a custom xsl If you want to show the date like you want it in a list: Create a Date column(Call Date1), leave it on the default view Then create another column for your text version date ...


2

try this one: var url = ctx.HttpRoot+"/_layouts/regionalsetng.aspx?Type=User"; $.get(url,function(data){ $(data).find("select[name=ctl00$PlaceHolderMain$ctl00$ctl00$DdlwebLCID]").find(":selected").each(function(){ var lcid = $(this).attr("value"); var cultureInfo = $(this).text(); }); }); ...


2

When the fields are read-only, you can't change them as you have found out. But it's likely that this will change in the near future since Microsoft spend a lot of resources to extend the Office 365 API's


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); } }


2

You can change using Site Settings (Gear Icon) from the top bar Then click on "Regional Settings" under "Site Administration" Change "Time Zone" Click Ok


1

Sharepoint will always store the value as UTC and will always serve it as UTC via web service calls, it is up to you to render it in the proper format. Native forms render them based off your regional settings, if you are rolling your own solution, you need to fetch those and adjust the time accordingly. The code provided should work to convert times ...


1

Each user can set their time zone in their profile (or you can set it directly via User Profile services). Open up the profile, switch to Language and Region settings and update the timezone. Now when they interact with the Calendars they show the appropriate times. EDIT They may have to change a setting to say to use their regional settings vs. admin ...


1

I figured this out. When switching to Greek Language, SharePoint also switches Sort Order to Greek automatically. Switching back to General Sort Order fixes this issue. I surelly cannot explain that, but tested it with outher Locales too, and for some reason it does the trick!


1

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 ...


1

1) For showing the language switch with localized content the one approach you can choose is content translation using Resource Files. Reference Link : Link 2) The other approach you can go with using the below code block : int intLCID = System.Threading.Thread.CurrentThread.CurrentUICulture.LCID; if (intLCID == 1025) { ...


1

The property you are after is called LocaleId. It cannot be set after the site template has been set. As for the new sites: how are you creating them? In the portal after you click SP Admin Centre>New>Private you should have an option to choose the language. From Powershell: new-sposite -owner -url -storagequota -localeid For English you should choose ...


1

It will not update the spell Checker, you have to manually change it. regardless of what language you have set your locale or settings to in your SharePoint instance that the spellchecker dictionary ALWAYS defaults to US English read this blog for more details: ...


1

Someone has posted a similar question before on here. They were given this bit of powershell to iterate through the Site Collections in the farm and change the settings to the UK region: [Reflection.Assembly]::LoadWithPartialName("System.Globalization") | out-null get-spweb -site http://yoururl -limit all |% { $_.Locale = ...


1

It is not possible to change it at farm level. Instead, you can create a calculated field for original date field and format the date accordingly.


1

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


1

In CSOM API Web class exposes Web.RegionalSettings property to get the regional settings that are currently implemented on the website. Example var regionalSettings = ctx.Web.RegionalSettings; ctx.Load(regionalSettings); ctx.ExecuteQuery();


1

Ok, so I figured this out (Edit: No I Didn't). It turns out, that there is a StorageTZ attribute on the Field element for CAML. You can set this value to UTC and then it will use the date as you pass it in instead of converting it to the users local time. For the Field element: http://msdn.microsoft.com/en-us/library/dd588183(v=office.11).aspx And this is ...


1

Actually it is possible, although a bit hacky. Check-out this blog post: http://dotnet.lv/blogs/antonsm/archive/2008/12/21/change-date-format-in-sharepoint.aspx I have been using this method a couple of times and it has worked fine in my cases.



Only top voted, non community-wiki answers of a minimum length are eligible