記錄一下:
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
