Time module extensions #9

Merged
muellerr merged 34 commits from time_extensions into main 2023-01-16 17:51:28 +01:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 5c6c016e13 - Show all commits

View File

@ -14,11 +14,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
from `chrono::DateTime<Utc>` and a generic UNIX timestamp (`i64` seconds from `chrono::DateTime<Utc>` and a generic UNIX timestamp (`i64` seconds
and subsecond milliseconds). and subsecond milliseconds).
# [v0.4.1] 14.01.2023
## Fixed ## Fixed
- CDS timestamp: The conversion function from the current time were buggy - CDS timestamp: The conversion function from the current time were buggy
when specifying picoseconds precision, which could lead to overflow 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 # [v0.4.0] 10.01.2023

View File

@ -1,6 +1,6 @@
[package] [package]
name = "spacepackets" name = "spacepackets"
version = "0.4.0" version = "0.5.0-rc.0"
edition = "2021" edition = "2021"
rust-version = "1.60" rust-version = "1.60"
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"] authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]

View File

@ -313,9 +313,7 @@ impl ConversionFromNow {
)); ));
} }
SubmillisPrecision::Picoseconds(_) => { SubmillisPrecision::Picoseconds(_) => {
prec = Some(SubmillisPrecision::Picoseconds( prec = Some(SubmillisPrecision::Picoseconds(now.subsec_nanos() * 1000));
(now.subsec_nanos() * 1000),
));
} }
_ => (), _ => (),
} }