From c12e5c2dde6f94313e8709ad8af7eec722657313 Mon Sep 17 00:00:00 2001 From: Wang Date: Tue, 8 Oct 2024 12:47:24 -0700 Subject: [PATCH] TH-121015: fix the datetime formate is still utc when adding new owner --- Server/SchoolBusAPI/Services/SchoolBusOwnerService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Server/SchoolBusAPI/Services/SchoolBusOwnerService.cs b/Server/SchoolBusAPI/Services/SchoolBusOwnerService.cs index 702d2617e..bf67f449f 100644 --- a/Server/SchoolBusAPI/Services/SchoolBusOwnerService.cs +++ b/Server/SchoolBusAPI/Services/SchoolBusOwnerService.cs @@ -532,6 +532,7 @@ public virtual IActionResult SchoolbusownersPostAsync(SchoolBusOwner body) { AdjustSchoolBusOwner(body); body.DateCreated = DateTime.UtcNow; + body.DateCreated = DateTime.SpecifyKind(body.DateCreated, DateTimeKind.Unspecified); _context.SchoolBusOwners.Add(body); _context.SaveChanges(); return new ObjectResult(body);