User-1380711633 posted
I need to create an application that displays the local time for a user, plus a drop down that allows them to select one of dozens of locations around the world and display the local time in that location. It has to be a real-time clock,
that is, a clicking clock, not a static time displayed upon load.
I had something written in JavaScript that displayed a realtime clock and then handled normal GMT/UTC deviations for any selected location. This wasn't too bad. Then I realized that it didn't take into account that some of the locations
use DST and at different times of the year and for certain durations. I had thought about trying to use .NET to somehow tap into the user's local Date and Time settings which seem to have Time Zone data at the OS level, but I have no idea how
to get to that data, and it seems like having the user's local time be the basepoint and them having the ability to check/uncheck to adjust for DST is going to be problematic.
Basically, I need to be able to get a reliable current time for anywhere in the world, regardless if they are currently within DST or not. And, I need to be able to plug the data into my current client script so the values can be real-time and not
rely on post-backs (what a nightmare that would be!).
Has anyone had any experience in doing this successfully in a production environment? This is for internal use, not commercial use. It will be used on our Intranet home page.
Any advice is greatly appreciated.
Thanks,
Jay