Solve rust/gigasecond
This commit is contained in:
parent
33d280ec94
commit
3586ece50a
2 changed files with 2 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
use time::PrimitiveDateTime as DateTime;
|
use time::{ext::NumericalDuration, PrimitiveDateTime as DateTime};
|
||||||
|
|
||||||
// Returns a DateTime one billion seconds after start.
|
// Returns a DateTime one billion seconds after start.
|
||||||
pub fn after(start: DateTime) -> DateTime {
|
pub fn after(start: DateTime) -> DateTime {
|
||||||
todo!("What time is a gigasecond later than {start}");
|
start + 1_000_000_000.seconds()
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ fn date() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn another_date() {
|
fn another_date() {
|
||||||
let start_date = dt(1977, 6, 13, 0, 0, 0);
|
let start_date = dt(1977, 6, 13, 0, 0, 0);
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ fn another_date() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn third_date() {
|
fn third_date() {
|
||||||
let start_date = dt(1959, 7, 19, 0, 0, 0);
|
let start_date = dt(1959, 7, 19, 0, 0, 0);
|
||||||
|
|
||||||
|
@ -36,7 +34,6 @@ fn third_date() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn datetime() {
|
fn datetime() {
|
||||||
let start_date = dt(2015, 1, 24, 22, 0, 0);
|
let start_date = dt(2015, 1, 24, 22, 0, 0);
|
||||||
|
|
||||||
|
@ -44,7 +41,6 @@ fn datetime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[ignore]
|
|
||||||
fn another_datetime() {
|
fn another_datetime() {
|
||||||
let start_date = dt(2015, 1, 24, 23, 59, 59);
|
let start_date = dt(2015, 1, 24, 23, 59, 59);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue