Search code examples
asp.net-mvcjsonserializer

Json() in MVC converts datetime to UTC automatically


I am already storing UTC time in DateTime objects.

When I send this across using Json() serializer these dates are again converted to UTC. I don't want this to happen.

Please help.


Solution

  • Check the Kind property of your DateTime objects, maybe they are not marked as UTC then they get converted again.