Determine a user's timezone

前端 未结 25 2901
刺人心
刺人心 2020-11-21 07:12

Is there a standard way for a web server to be able to determine a user\'s timezone within a web page?

Perhaps from an HTTP header or part of the user-agent

25条回答
  •  独厮守ぢ
    2020-11-21 07:38

    There are no HTTP headers that will report the clients timezone so far although it has been suggested to include it in the HTTP specification.

    If it was me, I would probably try to fetch the timezone using clientside JavaScript and then submit it to the server using Ajax or something.

提交回复
热议问题