From c534e998e8ffbb0ab7b6abf1e6476470a7392b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Tue, 14 Nov 2023 16:31:05 +0100 Subject: [PATCH] v0.0.322 bf SecondsF64 --- goextVersion.go | 4 ++-- rfctime/seconds.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }