From 9b89aed9dcadda11701f194e5b3f1f7f2a41d233 Mon Sep 17 00:00:00 2001 From: Mehrdad Arshad Rad Date: Mon, 11 Dec 2017 20:50:48 +0000 Subject: [PATCH] fixes #30 #41, DateTimeSeconds uint32 --- ipfix/interpret.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ipfix/interpret.go b/ipfix/interpret.go index 515a2703..1001f4d6 100644 --- a/ipfix/interpret.go +++ b/ipfix/interpret.go @@ -63,8 +63,10 @@ func Interpret(b *[]byte, t FieldType) interface{} { return string(*b) case Ipv4Address, Ipv6Address: return net.IP(*b) - case DateTimeSeconds, DateTimeMilliseconds, DateTimeMicroseconds, DateTimeNanoseconds: - return int64(binary.BigEndian.Uint64(*b)) + case DateTimeSeconds: + return binary.BigEndian.Uint32(*b) + case DateTimeMilliseconds, DateTimeMicroseconds, DateTimeNanoseconds: + return binary.BigEndian.Uint64(*b) case Unknown, OctetArray: return *b }