you need a geolocation javascript to get the country and time offset. something like what yahoo's geoloc api provides may work... then you need some rudimentary javascript functions that deal with formatting date / timestamps and outputting them on-screen. here is something i quickly put together that shows me my local time, GMT and time under IST (using mootools framework) http://fragged.org/dev/timezone.php According to your PC clock, your timezone is: GMT, you PC time is Fri Sep 25 2009 14:03:49 GMT+0100 (GMT Daylight Time), offset from GMT: +0100 GMT is now Fri Sep 25 2009 13:03:49 GMT+0100 (GMT Daylight Time) IST is now Fri Sep 25 2009 18:33:49 GMT+0100 (GMT Daylight Time) According to your geolocation from yahoo's APIs: GB United Kingdom 51.5 -0.11670000106096 Europe/London 1.0 0.0 0.0 2009-09-25 14:02 PHP: this does 2 lookups, local pc clock and based upon geolocation for coordinates (once again, my own but it can be tweaked). good luck anyway
You can download a GEO IP database from Maxmind for free as well (though using Yahoo's API is good as well)
http://fragged.org/dev/geoinfo.php -> demo on proper geolocation that also reports city/region/district, not just country. more here: http://fragged.org/extending-the-re...geolocation-data-from-yql-and-others_877.html
Hi, i was searching everywhere. I want my blog (wordpress) to show in German for german-speaking visitors (Austria,Germany, Switzerland) but in English for the rest of the world. I have know idea how this can be done. Are there any tutorials for newbies from scratch? Searching my ass off... thx
yep, look: if you trying to add uk and india time zone in same page you can use many application based on geological java scripts software search through googgle search engine. thanks sunny