Get client timezone (not GMT offset amount) in JS

后端 未结 5 2124
时光说笑
时光说笑 2020-12-14 18:04

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 l

5条回答
  •  甜味超标
    2020-12-14 18:29

    See this question. It's not doable in the general case, but for picking a default timezone from a shortlist of likely cases, you can make a decent guess.

    Allow the user to override it for when you guess wrong.

提交回复
热议问题