Use parse_rfc3339() in the tor-rtmock crate

This commit is contained in:
Neel Chauhan 2022-12-16 13:07:49 -08:00
parent fa5a417fc9
commit 11958c9241
3 changed files with 4 additions and 2 deletions

1
Cargo.lock generated
View File

@ -4133,6 +4133,7 @@ dependencies = [
"async-trait",
"futures",
"futures-await-test",
"humantime 2.1.0",
"pin-project",
"rand 0.8.5",
"thiserror",

View File

@ -14,6 +14,7 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[dependencies]
async-trait = "0.1.2"
futures = "0.3.14"
humantime = "2"
pin-project = "1"
thiserror = "1"
tor-rtcompat = { version = "0.8.0", path = "../tor-rtcompat" }

View File

@ -60,8 +60,8 @@ fn timeouts() {
}
fn start() -> SystemTime {
// Yes this is a homestuck reference
SystemTime::UNIX_EPOCH + Duration::from_secs(1239657180)
use humantime::parse_rfc3339;
parse_rfc3339("2009-04-13T09:13:00Z").unwrap()
}
const ONE_DAY: Duration = Duration::from_secs(86400);