From 87f19bdcc245e0efba2fc7fb5b172b8abc145f73 Mon Sep 17 00:00:00 2001 From: Patrick Pacher Date: Thu, 7 Sep 2023 11:59:36 +0200 Subject: [PATCH] Fix incorrect check using reflect.Float32 instead of reflect.Float64 --- netquery/orm/encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netquery/orm/encoder.go b/netquery/orm/encoder.go index a1b880b7..6ae8fb1b 100644 --- a/netquery/orm/encoder.go +++ b/netquery/orm/encoder.go @@ -181,7 +181,7 @@ func DatetimeEncoder(loc *time.Location) EncodeFunc { return nil, false, fmt.Errorf("failed to parse time as RFC3339: %w", err) } - case (normalizedKind == reflect.Int || normalizedKind == reflect.Uint || normalizedKind == reflect.Float32) && colDef.IsTime: + case (normalizedKind == reflect.Int || normalizedKind == reflect.Uint || normalizedKind == reflect.Float64) && colDef.IsTime: t = time.Unix(val.Int(), 0) default: