Get client timezone (not GMT offset amount) in JS

Posted by Rex M on Stack Overflow See other posts from Stack Overflow or by Rex M
Published on 2010-05-24T13:55:38Z Indexed on 2010/05/24 14:01 UTC
Read the original article Hit count: 219

Filed under:
|
|

I need to determine the client timezone (e.g. CET, GMT, EST) in JS. Getting the offset is straightforward, but doesn't have all the info necessary to determine the TZ, at least not easily. I have a feeling it might be possible to use a combination of offset, whether DST is in use and in effect, etc. but I'm hoping someone else has done the work already, especially considering the weird exceptions when dealing with time.

This question is similar but both the question and the answer are based on the (incorrect) assumption every browser's DateString format includes the name of the timezone - which it does not. That is an implementation detail.

So, with that I am currently stuck.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about datetime