fix issue #IARU2B

This commit is contained in:
wintel 2024-09-18 21:23:29 +08:00
parent 0b0e7485ce
commit b9ea8aa0d6
2 changed files with 9 additions and 1 deletions

View File

@ -94,7 +94,7 @@ namespace OpenAuth.Repository.Domain
/// 前端界面是否缓存 /// 前端界面是否缓存
/// </summary> /// </summary>
/// [Description("前端界面是否缓存")] /// [Description("前端界面是否缓存")]
public bool? KeepAlive { get; set; } public bool KeepAlive { get; set; }
} }
} }

View File

@ -95,6 +95,14 @@ namespace OpenAuth.Repository
{ {
property.SetValueConverter(boolToSmallIntConverter); property.SetValueConverter(boolToSmallIntConverter);
} }
//解决PostgreSQL时间戳问题
if (Database.ProviderName == "Npgsql.EntityFrameworkCore.PostgreSQL" &&
property.ClrType == typeof(DateTime))
{
property.SetValueConverter(new ValueConverter<DateTime, DateTime>(
v => v.ToUniversalTime(), v => DateTime.SpecifyKind(v, DateTimeKind.Utc)));
}
} }
} }
} }