Setting SharePoint regional time zone settings

Recently I had a user come up and state that when they would make a new announcement the time would be off by 2 hours.  They said they had checked the servers and time settings were fine and could there be anything else that might be off?  Well, yes there could and most likely is.  There is a regional setting option setting that you can get to by going to:

1. Problem page
2. Site Actions > Site settings
3. Regional settings (under Site Administration)
4. Time Zone settings

Now, this might work well for the page you are working on, but what if there is more?  And how can you tell?  For me the easiest way is to connect to the content database and take a look.  After connecting to the database you can run these queries.

(make sure you are pointing to your content database)
SELECT TimeZone,FullUrl
FROM dbo.Webs
WHERE (NOT (ParentWebId IS NULL))AND FullUrl like 'Url%'

If you are unsure about what to put in for 'Url%', then just run the first two lines and then see what is displayed.

UPDATE dbo.webs
SET TimeZone=11
WHERE (NOT (ParentWebId IS NULL))AND FullUrl like 'Url%'
AND TimeZone=13

The time zone was set to Pacific and I wanted Central, so I set it to Central (11) where Timezone = Pacific (13).  And my result:

(62 row(s) affected)

If you are unsure what your time zone is, then you first change the page and take note of page address.  Ex. /url/teamsite/pageyouchanged, so in the result list you would see you set it to 15 and the rest are 13.  Now you have the two numbers you need to put in.

Just a closing FYI, you can also find the timezone settings in TIMEZONE.xml located in the 14 (SharePoint 2010) hive under CONFIG.

http://msdn.microsoft.com/en-us/library/ms476633.aspx

This article is part of the GWB Archives. Original Author: Wade Salley

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.