I have an ASP.NET MVC app that stores all SQL DateTime in UTC, so that the time is consistent regardless of time zone that the client is hitting the site from.
Now, I want to re-display the correct time to the user, so any time I display a time in my View I use:
timeVariable.ToLocalTime();
However, .ToLocalTime() is based on the server, not the client.
Do I need to handle this in JavaScript on the client?
I probably could pass the time zone as part of the request and have the controller handle the offest, but I am assuming there is a better way to do this. Or isn't there?
Thanks in advance for any help!
-Matt