Json() in MVC converts datetime to UTC automatically

落花浮王杯 提交于 2019-12-11 14:13:38

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/10138562/json-in-mvc-converts-datetime-to-utc-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!