Hacker News new | ask | show | jobs
by joshfraser 4872 days ago
This post is dated, but describes some of the challenges with detecting timezones using JavaScript:

http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zo...

My code has since been adapted and lives on as jstz.min.js. This is the best library I know for handling this sort of stuff: https://bitbucket.org/pellepim/jstimezonedetect

1 comments

That's an interesting post, and an equally interesting library. However, Walltime is more concerned with the displaying of dates than the detection of timezones.

The example I give from the post explains it like this "... if I’m a user in Australia, and I want to post something at 3:00 AM Chicago time, where the majority of my followers are, how do I calculate that accurately with JavaScript and send it up to the server?". Or, if I'm a user in Australia, but I want to display all my dates on the site like I'm a user in Chicago, how would I do that?

Take a look at the github page description for more info about the type of problems it can help with: http://sproutsocial.github.com/walltime-js/

Ah, skimmed too fast. Thanks for the clarification. I just happened to notice that some of the DST detection logic seemed similar.