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?


Was it helpful?


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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow