diff --git a/parser/devicePrsInternal.go b/parser/devicePrsInternal.go index 89aba53..163e331 100755 --- a/parser/devicePrsInternal.go +++ b/parser/devicePrsInternal.go @@ -19,7 +19,7 @@ import ( ) const ( - ALLOWED_TIME_HOUR = -1 + ALLOWED_TIME_MINUTES = -5 ) type ruptelaTchHeader struct { @@ -327,8 +327,8 @@ func parseData(data []byte, imei uint64, tagOption *opt.Options) (rec DeviceReco deviceRecord.TagDevices = tags_ tstampToNow := time.Since(deviceRecord.Tstamp) - hCurr := math.Round(tstampToNow.Hours()*100)/100 - if hCurr >= ALLOWED_TIME_HOUR { + hCurr := math.Round(tstampToNow.Minutes()*100)/100 + if hCurr >= ALLOWED_TIME_MINUTES { deviceRecords = append(deviceRecords, deviceRecord) }