Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
HalterCru committed May 23, 2024
1 parent 81b5d43 commit fe6d42b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/ttnpb/udp/translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ func convertUplink(rx RxPacket, md UpstreamMetadata) (*ttnpb.UplinkMessage, erro
case rx.Tmms != nil:

ggt := gpstime.Parse(time.Duration(*rx.Tmms) * time.Millisecond)
currentUTC := time.Now().UTC()

if (time.Now().Add(gpsTimeDelta).After(ggt) && ggt.Add(gpsTimeDelta).After(time.Now())) || time.Now().Equal(ggt) {
if (currentUTC.Add(gpsTimeDelta).After(ggt) && ggt.Add(gpsTimeDelta).After(currentUTC)) || currentUTC.Equal(ggt) {
goGpsTime = ggt
goTime = goGpsTime
}
Expand Down

0 comments on commit fe6d42b

Please sign in to comment.