Javascript/PHP and timezones

后端 未结 5 1733
一个人的身影
一个人的身影 2020-12-11 05:54

I\'d like to be able to guess the user\'s timezone offset and whether or not daylight savings is being applied. Currently, the most definitive code that I\'ve found for this

5条回答
  •  旧巷少年郎
    2020-12-11 06:18

    To robustly determine a user's timezone using javascript. Check out jsTimezoneDetect.

    It will give you an Olsen timezone database key that you can use for server side datetime calculations.

提交回复
热议问题