World Clock

Building a World Clock is not an easy task, especially due to Daylight Saving Time. So the easiest way to get the time for different cities is… to rely on an online service.

I have been using dateandtime.com for some time now, and recently I discovered clocklink.com. I am going to use the latter for my example.

ClockLink has an impressive gallery of Flash based analog and digital clocks. The Flash widget is highly customizable, as you can enter the model, color and location as parameters. So this is a perfect fit for a calculated column. An example:
http://www.clocklink.com/clocks/0012-ltblue.swf?TimeZone=USA_SanDiego
By clicking on the above link, you’ll get the clock model 0012, in light blue color (ltblue), for San Diego.

Let’s go ahead and build our SharePoint list. I chose a custom list with the following columns:
– City: text column (San Diego)
– Country_City: text column (USA_SanDiego)
– Model: choice column (0012, etc.)
– Color: choice column (dkblue, ltblue, blue, red, silver, green, magenta, etc.
– Clock: calculated column with the following formula:

="<DIV><embed src='http://www.clocklink.com/clocks/"&Model&"-"&Color&".swf?TimeZone="&Country_City&"' width='150' height='150' wmode='transparent' type='application/x-shockwave-flash'></DIV>"

The last step is to apply our “HTML calculated column” method to convert the HTML strings into actual HTML.

Check out the result on the home page of my demo site:
http://www.PathToSharepoint.com

15 thoughts on “World Clock

  1. Hi ,
    I have been through your post on “WORLDCLOCK”,I tried this on my sharepoint , i have created columns as you said but I’m not getting the clock image under calculated column but simply showing the formulae i copy pasted in the calculated column.Any Ideas on making this work i will be very thankfull to you .

  2. Pingback: Links for January 12, 2009 « Steve Mullen’s Blog

  3. The clock instructions worked perfectly. Thanks so much. However, I wanted to use the Countdown to Vancouver Olympics but I can’t seem to make it work. I got the picture to show up but not the actual countdown numbers. I am thinking I need to add additional columns to account for this but haven’t been able to make it work, especially the clock part in the calculated field. Have you done this? If so, can you provide instructions? I would really appreciate all the help I can get. Thanks.

  4. Christophe,

    Since I posted my question, I have been reading and reading more of your information and with the help of a friend, we figured it out. Thanks so much for all the great information and instructions that you post. I’m a complete novice at SharePoint and HTML but I’ve been able to do some amazing stuff by reading and applying your instructions. Thanks!

  5. Christophe,

    I need your help again. I have both Olympic countdown clocks up and working now, but how do I get them side by side like you have on the world clock? Right now they are one on top of one another.

  6. Hello Christophe,

    I have been through your post on “WORLDCLOCK”,I tried this on my sharepoint , i have created columns as you said and able to see world clock on my page…but unfortunately other users are not able to view the clock..

    I would appreciate your help.

  7. I’ve recently found ready-to-use wold clock web part for Sharepoint, it’s available at http://www.virtosoftware.com It’s also possbile to use your own skin by using code

    .theme0Sec, .theme0Min, .theme0Hour{background-color: #6699CC; position:absolute; height: 2px; width: 2px; font-size: 2px; }
    .theme0Sec{ background-color: #6699CC ! important;height: 1px ! important; width: 1px ! important;font-size: 1px ! important;}
    .theme0Container{background-image: url(‘http://www.virtosoftware.com/themeClockBackground/halloween1.png’) ! important;background-repeat: no-repeat;height: 110px;width: 110px;position: relative;}

  8. Is there a way to refrence the clock information into a workflow?
    Using the today function dosn’t work.
    Im tying to create a workflow that will archive items into a document library every week or month.
    I’ve had no luck with geting recurence data from the calander implimented into a workflow.
    Any chance I could use this world clock’s timer as a time refence in a collumn that sharepoint can see in a workflow?

    Thanks

  9. Does anyone know of a site that allows you to create/ get code for a world clock that is then put on a secure SharePoint site? Previously timeanddate.com offered a secure site option, but just recently took that away. I would like to have this functionality – but don’t want to have to deal with the “are you sure you want to access insecure data…etc.”. Any thoughts? Thanks!

Comments are closed.