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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user