diff --git a/goextVersion.go b/goextVersion.go index 33cdfc9..4f08219 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.321" +const GoextVersion = "0.0.322" -const GoextVersionTimestamp = "2023-11-14T16:00:14+0100" +const GoextVersionTimestamp = "2023-11-14T16:31:05+0100" diff --git a/rfctime/seconds.go b/rfctime/seconds.go index a9bc57e..f3f8013 100644 --- a/rfctime/seconds.go +++ b/rfctime/seconds.go @@ -73,12 +73,12 @@ func (d *SecondsF64) UnmarshalBSONValue(bt bsontype.Type, data []byte) error { if bt != bson.TypeDouble { return errors.New(fmt.Sprintf("cannot unmarshal %v into SecondsF64", bt)) } - var tt float64 - err := bson.RawValue{Type: bt, Value: data}.Unmarshal(&tt) + var secValue float64 + err := bson.RawValue{Type: bt, Value: data}.Unmarshal(&secValue) if err != nil { return err } - *d = SecondsF64(tt) + *d = SecondsF64(int64(secValue * float64(time.Second))) return nil }