Skip to content

Commit

Permalink
fix: isBelong logic was not correct
Browse files Browse the repository at this point in the history
  • Loading branch information
muktihari committed Nov 24, 2023
1 parent d5a7e21 commit dd56355
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/wasm/activity-service/activity/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ func isBelong(timestamp, startTime, endTime time.Time) bool {
return true
}
if endTime.IsZero() { // Last Lap or Session has no EndTime
if timestamp.After(startTime) {
return true
}
} else {
if timestamp.After(startTime) || timestamp.Equal(endTime) {
return true
}
return timestamp.After(startTime)
}
if timestamp.Equal(endTime) {
return true
}
return false
return timestamp.After(startTime) && timestamp.Before(endTime)
}

0 comments on commit dd56355

Please sign in to comment.