Skip to content

Commit

Permalink
fix timezone change swaps start and end
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad2002 committed Oct 24, 2024
1 parent 90e062e commit 4339822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/incident_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func UpdateIncidentDateByMeeting(meeting string, t time.Time, updateTimeZone boo
tz2 = t2.Location()
}

incident.End = time.Date(t1.Year(), t1.Month(), t1.Day(), t1.Hour(), t1.Minute(), t1.Second(), t1.Nanosecond(), tz1)
incident.Start = time.Date(t2.Year(), t2.Month(), t2.Day(), t2.Hour(), t2.Minute(), t2.Second(), t2.Nanosecond(), tz2)
incident.Start = time.Date(t1.Year(), t1.Month(), t1.Day(), t1.Hour(), t1.Minute(), t1.Second(), t1.Nanosecond(), tz1)
incident.End = time.Date(t2.Year(), t2.Month(), t2.Day(), t2.Hour(), t2.Minute(), t2.Second(), t2.Nanosecond(), tz2)

saved, err := UpdateIncident(incident)
if err != nil {
Expand Down

0 comments on commit 4339822

Please sign in to comment.