Solve rust/gigasecond

This commit is contained in:
Avery Winters 2023-10-11 11:06:56 -05:00
parent 33d280ec94
commit 3586ece50a
Signed by: avery
SSH key fingerprint: SHA256:eesvLB5MMqHLZrAMFt6kEhqJWnASMLcET6Sgmw0FqZI
2 changed files with 2 additions and 6 deletions

View file

@ -1,6 +1,6 @@
use time::PrimitiveDateTime as DateTime;
use time::{ext::NumericalDuration, PrimitiveDateTime as DateTime};
// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
todo!("What time is a gigasecond later than {start}");
start + 1_000_000_000.seconds()
}

View file

@ -20,7 +20,6 @@ fn date() {
}
#[test]
#[ignore]
fn another_date() {
let start_date = dt(1977, 6, 13, 0, 0, 0);
@ -28,7 +27,6 @@ fn another_date() {
}
#[test]
#[ignore]
fn third_date() {
let start_date = dt(1959, 7, 19, 0, 0, 0);
@ -36,7 +34,6 @@ fn third_date() {
}
#[test]
#[ignore]
fn datetime() {
let start_date = dt(2015, 1, 24, 22, 0, 0);
@ -44,7 +41,6 @@ fn datetime() {
}
#[test]
#[ignore]
fn another_datetime() {
let start_date = dt(2015, 1, 24, 23, 59, 59);