Gautam Jain
Gautam Jain

Reputation: 6849

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.

Upvotes: 0

Views: 1662

Answers (1)

Adriano Repetti
Adriano Repetti

Reputation: 67070

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

Upvotes: 3

Related Questions