diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e98d4..8991b73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,11 +14,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/). from `chrono::DateTime` and a generic UNIX timestamp (`i64` seconds and subsecond milliseconds). +# [v0.4.1] 14.01.2023 + ## Fixed - CDS timestamp: The conversion function from the current time were buggy when specifying picoseconds precision, which could lead to overflow - multiplications and incorrect precision fields. + multiplications and/or incorrect precision fields. # [v0.4.0] 10.01.2023 diff --git a/Cargo.toml b/Cargo.toml index a2ef1fc..8bc5290 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spacepackets" -version = "0.4.0" +version = "0.5.0-rc.0" edition = "2021" rust-version = "1.60" authors = ["Robin Mueller "] diff --git a/src/time/cds.rs b/src/time/cds.rs index 7f8b7a7..fbb0698 100644 --- a/src/time/cds.rs +++ b/src/time/cds.rs @@ -313,9 +313,7 @@ impl ConversionFromNow { )); } SubmillisPrecision::Picoseconds(_) => { - prec = Some(SubmillisPrecision::Picoseconds( - (now.subsec_nanos() * 1000), - )); + prec = Some(SubmillisPrecision::Picoseconds(now.subsec_nanos() * 1000)); } _ => (), }