From 05d0f9e469752c618fd8320c0deb2e74d75d3639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 5 May 2023 18:18:20 +0200 Subject: [PATCH] v0.0.115 --- rfctime/rfc3339Nano.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rfctime/rfc3339Nano.go b/rfctime/rfc3339Nano.go index f8df4c7..6bc9256 100644 --- a/rfctime/rfc3339Nano.go +++ b/rfctime/rfc3339Nano.go @@ -115,7 +115,11 @@ func (t RFC3339NanoTime) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.Value return err } - val.Set(reflect.ValueOf(t)) + if val.Kind() == reflect.Ptr { + val.Set(reflect.ValueOf(&t)) + } else { + val.Set(reflect.ValueOf(t)) + } return nil }