记录一下:
Startup中,将
services.AddMvc();
改为:
services.AddMvc().AddJsonOptions(options => { options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; });
解决办法来自:https://stackoverflow.com/questions/41642800/change-default-format-for-datetime-parsing-in-asp-net-core