1. Jon Nylander
  2. jsTimezoneDetect

Issues

Issue #34 invalid

Olson identifier is wrong for Europe/Stockholm?

Anonymous created an issue

I live in Gothenburg Sweden. As such I assume the correct Olson identifier for my timezone would be "Europe/Stockholm". Although when I goto this page:

http://www.pageloom.com/automatic-timezone-detection-with-javascript

..it says my timezone is "Europe/Berlin". I get the same result whether I use Chrome or IE. Is it wrong?

Comments (2)

  1. Jon Nylander repo owner

    (Reply via j...@pageloom.com):

    The script returns Europe/Berlin for all zones in the central european timezone. And this is by design.

    The strengths of this script are that it is fast and synchronous and reliable. It does this at the cost of granularity. Since it does not make use of IP lookup or the Geolocation API (neither of which are 100% reliable for timezone detection) it cannot be extremely exact. But it can be reliable. It simply returns the most inhabited identical timezone to the one you have set your computer to.

    This is great for serverside datetime calculations over timezones.

    It's not that great to display to an end user, since he/she will expect exactly what you yourself stated :).

    I am working on an asynchronous addition which will use both geolocation and IP lookups for a more exact result.

    I live in Stockholm too :)

  2. Log in to comment