开发者

Get a user's timezone in Python + Pylons

Is there a way to get th开发者_开发问答e timezone of the connecting user using Pylons, and to adjust the content before rendering accordingly? Or can this only be done by JS?

Thanks.


You can't get the client's timezone using server-side code, you can, however:

  1. use Javascript: Date.getTimezoneOffset();
  2. use geolocation to determine where the user is located and deduce the timezone from the location
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜