HI in my webpage, I’ve got 3 different clocks made by flash. All the flash clocks are working. Now i need to set the real time to all these 3 clocks. Do you have any idea to show the real clock to the html web page using javascript or jquery? i need to show the clocks for London, Newyork and New delhi. Is it possible?
This flash clocks have the parameters to set the times like this:
{thisH:myH + 2,thisM:myM + 2,thisS:myS + 2};
So, do I just need to pass the real times to this variables. How can i get 3 different times from any server? Any one help me?
You can use earthtools.org . They have a free web service that provides you with all the time data you might want for any place on earth.
http://www.earthtools.org/webservices.htm#timezone
this is an example of the data for NY:
http://www.earthtools.org/timezone-1.1/40.71417/-74.00639
will return:
You can consume the service easily with jQuery