I store dates in a database using UTC. The client (javascript) receives the date and converts it to local time. This works great when working on localhost (which means that the time zone of the web server is the same as the time zone of the client). However, when I deploy Azure, where the web server’s time zone is UTC, I return the date already set to the client’s time zone, forcing the client to display the wrong time value.
I assume ASP.NET MVC is doing this conversion. It's true? If so, how can I prevent this and make the dates be passed unchanged?
I tried to set the type of the datetime passed object to DateTimeKind.UnSpecified, but this does not work.
source share