tor-dirmgr: Work around an apparent regression in `time`.

Some code in our tests that worked fine with time 0.3.17 no
longer works with 0.3.19, despite the semver.

See https://github.com/time-rs/time/issues/552 for the upstream bug.
This commit is contained in:
Nick Mathewson 2023-02-17 14:24:31 -05:00
parent a300bed405
commit 2b515c8d25
1 changed files with 3 additions and 3 deletions

View File

@ -1121,7 +1121,7 @@ pub(crate) mod test {
netstatus::Lifetime::new(
now.into(),
(now + one_hour).into(),
(now + one_hour * 2).into(),
SystemTime::from(now + one_hour * 2),
)
.unwrap(),
[0xAB; 32],
@ -1178,7 +1178,7 @@ pub(crate) mod test {
netstatus::Lifetime::new(
now.into(),
(now + one_hour).into(),
(now + one_hour * 2).into(),
SystemTime::from(now + one_hour * 2),
)
.unwrap(),
[0x99; 32],
@ -1219,7 +1219,7 @@ pub(crate) mod test {
sk_fingerprint: [3; 20].into(),
};
let m1 = AuthCertMeta::new(keyids, now.into(), (now + one_hour * 24).into());
let m1 = AuthCertMeta::new(keyids, now.into(), SystemTime::from(now + one_hour * 24));
store.store_authcerts(&[(m1, "Pretend this is a cert")])?;