문제

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:

  1. use Javascript: Date.getTimezoneOffset();
  2. use geolocation to determine where the user is located and deduce the timezone from the location
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top