0

I am trying to log the timezone of the user. So on login I get their Session and Request objects and try to get it via

$request->request?->get('_timezone')

But this key doesn't exist. So using Symfony5 - how can I get to the user timezone reliably?

Pavlin Petkov
  • 1,022
  • 3
  • 17
  • 38
  • To my knowledge, browsers don't share this information with the servers, so Symfony can't access it. You may get it from Javascript though: [Getting the client's time zone (and offset) in JavaScript](https://stackoverflow.com/questions/1091372/getting-the-clients-time-zone-and-offset-in-javascript) – A.L Jul 07 '23 at 18:23

0 Answers0