参照网友的解决方案
IsoDateTimeConverter timeFormat = new IsoDateTimeConverter();
timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
Console.WriteLine(JsonConvert.SerializeObject(dt, Formatting.Indented, timeFormat));
就这么简单
参照网友的解决方案
IsoDateTimeConverter timeFormat = new IsoDateTimeConverter();
timeFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
Console.WriteLine(JsonConvert.SerializeObject(dt, Formatting.Indented, timeFormat));
就这么简单