diff --git a/IRaCIS.Core.Infra.EFCore/Context/Triggers/AuditAddTrigger.cs b/IRaCIS.Core.Infra.EFCore/Context/Triggers/AuditAddTrigger.cs index 3d1a09b8c..50e1bb992 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/Triggers/AuditAddTrigger.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/Triggers/AuditAddTrigger.cs @@ -50,7 +50,12 @@ namespace IRaCIS.Core.Application.Triggers { context.Entity.CreateUserId = _userInfo.Id; context.Entity.CreateUser = _userInfo.UserName; + } + + if (context.Entity.CreateTime == default(DateTime)) + { context.Entity.CreateTime = DateTime.UtcNow.AddHours(8); + } return Task.CompletedTask;