Skip to content

Commit

Permalink
Adding time modification to ensure start and end times align in datab…
Browse files Browse the repository at this point in the history
…ase calls
  • Loading branch information
COMTOP1 committed Aug 22, 2024
1 parent 044cb91 commit a84d069
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions views/officership.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ func (v *Views) OfficerAddFunc(c echo.Context) error {
return errors.New("start date must be before today")
}

// Add 22 hours to always be at the end of the day when adding vs the midnight for ending,
// this takes into consideration daylight savings from the server side
parseStart = parseStart.Add(time.Hour * 22)

endDate := null.NewTime(time.Time{}, false)

if tempEndDate != "" {
Expand Down

0 comments on commit a84d069

Please sign in to comment.