v0.0.322 bf SecondsF64
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m1s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m1s
This commit is contained in:
parent
88642770c5
commit
c534e998e8
@ -1,5 +1,5 @@
|
|||||||
package goext
|
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"
|
||||||
|
@ -73,12 +73,12 @@ func (d *SecondsF64) UnmarshalBSONValue(bt bsontype.Type, data []byte) error {
|
|||||||
if bt != bson.TypeDouble {
|
if bt != bson.TypeDouble {
|
||||||
return errors.New(fmt.Sprintf("cannot unmarshal %v into SecondsF64", bt))
|
return errors.New(fmt.Sprintf("cannot unmarshal %v into SecondsF64", bt))
|
||||||
}
|
}
|
||||||
var tt float64
|
var secValue float64
|
||||||
err := bson.RawValue{Type: bt, Value: data}.Unmarshal(&tt)
|
err := bson.RawValue{Type: bt, Value: data}.Unmarshal(&secValue)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
*d = SecondsF64(tt)
|
*d = SecondsF64(int64(secValue * float64(time.Second)))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user