diff --git a/rfctime/rfc3339.go b/rfctime/rfc3339.go index 0e350ff..aea8e4f 100644 --- a/rfctime/rfc3339.go +++ b/rfctime/rfc3339.go @@ -67,7 +67,7 @@ func (t *RFC3339Time) UnmarshalText(data []byte) error { func (t *RFC3339Time) UnmarshalBSONValue(bt bsontype.Type, data []byte) error { if bt == bsontype.Null { - *t = RFC3339Time{} + //t = nil return nil } if bt != bsontype.DateTime { diff --git a/rfctime/rfc3339Nano.go b/rfctime/rfc3339Nano.go index 8383b32..b6bef36 100644 --- a/rfctime/rfc3339Nano.go +++ b/rfctime/rfc3339Nano.go @@ -67,7 +67,7 @@ func (t *RFC3339NanoTime) UnmarshalText(data []byte) error { func (t *RFC3339NanoTime) UnmarshalBSONValue(bt bsontype.Type, data []byte) error { if bt == bsontype.Null { - *t = RFC3339NanoTime{} + //t = nil return nil } if bt != bsontype.DateTime {