diff --git a/Server/SchoolBusAPI/Services/InspectionService.cs b/Server/SchoolBusAPI/Services/InspectionService.cs index 69b0c3e8b..8be8d334b 100644 --- a/Server/SchoolBusAPI/Services/InspectionService.cs +++ b/Server/SchoolBusAPI/Services/InspectionService.cs @@ -197,6 +197,9 @@ public virtual IActionResult InspectionsIdPutAsync(int id, Inspection item) var exists = _context.Inspections.Any(a => a.Id == id); if (exists && id == item.Id) { + item.CreatedDate = DateTime.SpecifyKind(item.CreatedDate, DateTimeKind.Unspecified); + item.InspectionDate = DateTime.SpecifyKind(item.InspectionDate, DateTimeKind.Unspecified); + item.PreviousNextInspectionDate = DateTime.SpecifyKind(item.PreviousNextInspectionDate.GetValueOrDefault(), DateTimeKind.Unspecified); _context.Inspections.Update(item); // Save the changes _context.SaveChanges();