views:

432

answers:

1

We are building a large SharePoint 2007 installation with several hundred site collections over four regionally hosted Web applications. We have approximately 12,000 users, spread out more or less evenly around the globe, and each user may visit many site collections - both on their "home" regional server and on other regional servers.

My question is: how can we allow each user to set his/her time zone once, but allow the time zone to be synchronized to each site collection? Also, if the user moves from one time zone to another, how can we allow him/her to change time zones and apply the changes across all site collections?

We've considered the following:

  1. Update time zone records via the SharePoint API using a scheduled process. Clumsy and slow - we'd prefer changes to take effect more quickly, and our maintenance windows are pretty small already.

  2. Put a trigger on the table that holds time zone information and use a .NET stored proc to update via the SharePoint API. Definitely goes counter to SP best practices.

  3. Create a workflow that allows a user to set his/her home time zone, and then iterate through the site collections to set the appropriate time zone info. This seems to work for existing site collections, but new site collections wouldn't get the settings.

  4. Store the user's time zone in a cookie; have the master page get the cookie and update the current site collection's time zone setting. May work, but our users may use multiple machines, and also, we would rather not have the overhead of doing this on every page load.

So bottom line is that we're not sure what the best option is for us. Any thoughts would be appreciated.

+1  A: 

I would suggest building on your cookie idea:

  1. Store user's time zone in their profile and provide an interface to change it.
  2. On page load, if a time zone cookie does not exist create one based on the user profile value.
  3. Compare the cookie value to the time zone set in SPContext.Current.Web.CurrentUser and update accordingly.

As the SPUser object will already exist, and you can use cookies to avoid constantly looking up the profile value, the performance impact should be negligible. You can either add this logic to the master page or use a delegate control to insert a light-weight control (my preference).

dahlbyk
Thanks - we will give that a try.
Roger