1 private void ConfigureDateTime() 2 { 3 Configure<MvcNewtonsoftJsonOptions>(options => 4 { 5 options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";//对类型为DateTime的生效 6 }); 7 Configure<AbpJsonOptions>(options => 8 options.DefaultDateTimeFormat = "yyyy-MM-dd HH:mm:ss" //对类型为DateTimeOffset生效 9 ) ; 10 }