As a collaboration platform, SharePoint Online allows people to share and work on contents in different time zones. It is often required to get the time zone information in context. For example, in a Document Library, you need to transform the created date time in a user-friendly way. The first step is to figure out what time zone it is displaying. There are two types of Regional Settings that specify the time zone:
- Regional Settings in User Profile Settings
- Regional Settings under each site
By default, the Regional Settings in the User Profile settings are not set. If the user didn’t select the regional setting in the User Profile Settings page, SharePoint will take the Regional Settings from the site in context. If the user does set the regional settings in the profile page, then SharePoint will ignore the regional setting in the site.
Choosing a Global Software Development Partner to Accelerate Your Digital Strategy
To be successful and outpace the competition, you need a software development partner that excels in exactly the type of digital projects you are now faced with accelerating, and in the most cost effective and optimized way possible.
The source code is available on GitHub.
If you are wondering about the “SPTimeZoneNameToSPTimeZoneId[userTimeZoneValue]” code, you can read my previous blog about “Mappings between SharePoint Time Zones and IANA Time Zones.”