- how your intranet can have a free lunch by consuming XML services from the internet
Business Problem
Staff need to know the time in other offices around the world.
The intranet tool I'd built in house worked well but every time somewhere changed their daylight saving time one or more office time's got out of synch and ended up being wrong. The tool relied on staff picking up problems, reporting them and me reacting.
My reaction involved referencing the information on
And updating my code with what I found.
Being keen on meeting new folks I contacted Steffen Thorsen, who created and maintains timeanddate.com, to see if he had any suggestions about my problem.
The Solution
Steffen said he was in the process of creating XML services that he thought might fit our requirements.
Once timeanddate.com had given me a profile for their XML service I started looking at how I could reproduce my intranet office times tool using the timeanddate.com XML service.
My intranet tool got a list of current offices from our employee profile database, it then associated those with pre defined rules relating to daylight savings time [because they got out of date they were the cause of my problem] and displayed the office it's current time and whether or not the time was within working hours or not.
As you'll note there are a couple of smaller towns in my list. Locations which aren't in timeanddate.com's extensive list of locations.
So for this reason and because the XML had to be retrieved from an external site I decided to grab the XML and manipulate it on the server side, rather than doing it in the user's browser.
Once I've got the information I want, manipulated it (changed a few location names) and added the sun and moon icons I display it to the user, layout via CSS.
The technical details
This tool was setup on and IIS6 server running classic ASP.
The key object to get to know so that you can do this sort of thing is Server.CreateObject("Microsoft.XMLDOM") or it's more modern cousins.
Great resources for those of you doing the coding work for this sort of thing are
and
Conclusion
The move from 'maintenance nightmare' to always correct (Thanks Steffen) time and date information for our global offices did take some time and learning.
Knowing that I've got a professional team on the end of my times and dates XML (www.timeanddate.com) means I can concentrate on all the other things on my plate ;-)
Happy to answer any questions on this tool that anyone may have.
DorjeM
Disclaimer
I don't have any financial interest in timeanddate.com.
I've been using Steffen's services for so long I trust and respect them so I thought I'd share my enthusiasm for what he does.
Comments