diff --git a/stream/mts/psi/op.go b/stream/mts/psi/op.go index cebea13a..55f9df8d 100644 --- a/stream/mts/psi/op.go +++ b/stream/mts/psi/op.go @@ -85,11 +85,7 @@ func TimeFrom(p []byte) (t uint64, err error) { if err != nil { return 0, err } - // TODO: could probably write a byte slice to int func, so that this would - // be replaced by extraction of time data slice and then call to conversion func - for i := range p[timeDataIndx : timeDataIndx+timeDataSize] { - t |= uint64(p[i+timeDataIndx]) << uint(56-i*timeDataSize) - } + t = binary.BigEndian.Uint64(p[timeDataIndx : timeDataIndx+timeDataSize]) return t, nil }