0

Is it possible to read in the user's local timezone from the browser when they go to our website? Either logging in or where they are already logged in?

Reason: I would like to read the local time zone when they go to our URL (MVC asp.net web application) and store that in memory while they are in the application so we can convert to their local timezone from our UTC datetimes that are stored in the database.

Thanks.

ttaylor27272727
  • 195
  • 3
  • 18
  • 1
    Possible duplicate: https://stackoverflow.com/questions/8194016/how-to-get-current-user-timezone-in-c-sharp – riffnl Mar 02 '21 at 23:33
  • @riffnl: uggghh, I was hoping someone would post a way where I didn't have to pass it on EVERY call. Guess it still isn't possible in asp.net / C# etc. – ttaylor27272727 Mar 02 '21 at 23:43
  • well you don't - there's also a Session where you could keep track of that info (for starters, there are more roads that lead to Rome) – riffnl Mar 02 '21 at 23:45
  • @riffnl: are you referring to this: https://stackoverflow.com/questions/338482/can-you-determine-timezone-from-request-variables – ttaylor27272727 Mar 03 '21 at 00:31

0 Answers0