diff --git a/rfctime/rfc3339Nano.go b/rfctime/rfc3339Nano.go index 428c8e2..7d9f16b 100644 --- a/rfctime/rfc3339Nano.go +++ b/rfctime/rfc3339Nano.go @@ -70,7 +70,7 @@ func (t *RFC3339NanoTime) UnmarshalBSONValue(bt bsontype.Type, data []byte) erro return errors.New(fmt.Sprintf("cannot unmarshal %v into RFC3339NanoTime", bt)) } var tt time.Time - err := bson.Unmarshal(data, &tt) + err := bson.RawValue{Type: bt, Value: data}.Unmarshal(&tt) if err != nil { return err }