Project Description
SharePoint 2010 TimeZone Web Part is being developed to try and take care of the need for users to set their regional timezone information within a site.

This is a Visual Studio 2010 Project current setup as a farm solution.  You will need to modify the the Site Url is you are going to edit this in your project.  You will also need access to the SharePoint dlls.

Properties Changes

The SharePoint 2010 TimeZone Web Part reads the regional settings of the current user and displays their timezone as a graphical display as shown below.  This Web Part basically sets the users regional settings for them.  This web part also accepts the query string attribute named "tz" so if you supply it the offset from utc it will change the users timezone for them to the new timezone.

used in combination with many of the scripts that are easily findable on the something like a content editor web part with the following script.

<script language="javascript">

ourDate = new Date();
document.write("The time and date at your computer's location is: "
+ ourDate.toLocaleString()
+ ".<br/>");
document.write("The time zone offset between local time and GMT is "
+ ourDate.getTimezoneOffset()
+ " Minutes.<br/>");
document.write("The time and date (GMT) is: "
+ ourDate.toGMTString()
+ ".<br/>");

window.location = "http://[YOURSITENAME]/[YOUR PAGE]?tz=" + ourDate.getTimezoneOffset()</script>

would read the local time set the offset and display the web part with the new time zone as well as change the users regional settings to the new timezone.

This makes the change transparent to the user and for businesses that have multiple offices and the users move between offices provided the changed the computer clock on there laptop then everything would display appropriately based on where they are.  This also assists in removing the need for users to remember to set their timezone and reduce the calls on why there calendars are appearing wrong or dates and times being off.   I wanted to get this out there so that I could get feed back on the part and provide a start for other people trying to do the same thing.

I should also note that the coding for this was based on input from several sources.  I have merely blended them together to create the basis for the web part.

Please contact me if you would like to assist in the development of this web part.

V 0.0.2 Update

Added the theme selection dropdown for the custom toolpart panel.

V 0.0.3 Update

Added additional properties to the custom toolpart panel.  Also, added a clock to show the time from the local PC.  Cleaned up some of the functions to reduce the code.

 V 0.0.4 Update

Added an analog clock function based on the Raphaël-min-js library.  Primary source and information regarding this function was found on the Emanuele Feronato.  The Analog clock is also able to be turned on and off in the properties section.  Next release will be to work on the sizing right now it is hard coded but I should probably be able to get the sizing based on the web part width pretty easy.  But wanted to get the latest version up.  Below you will see the latest screen shot

V 0.0.4


Last edited Feb 22, 2012 at 5:15 PM by spterrill, version 13