Explores how to track and manage the time at a user's location without user intervention both on the backend and frontend.
Using a combination of the services from Google AJAX APIs and GeoNames, it is possible to determine the timezone at the user's current location, making it easy to manage database timestamps and display an accurate clock on the user's web page irrespective of the user's computers locale. If a user is in Paris accessing your website which displays the time at the user's location and then flies to San Francisco before returning to your website, the time at the user's new location can be displayed accurately without the user's intervention. The time will remain correct on the web page even if the user changes their computer's locale.
The issue of same-origin policy domain restrictions neccesitate implementing the call to GeoNames from the backend, the results of which can be returned in an ajax response. This also allows the determined timezone to be potentially stored in a server-side session record that may be used manage server side timestamps.