Get a user's timezone in Python + Pylons
문제
Is there a way to get the 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:
- use Javascript:
Date.getTimezoneOffset();
- use geolocation to determine where the user is located and deduce the timezone from the location
제휴하지 않습니다 StackOverflow