Finish gigasecond

This commit is contained in:
Blizzard Finnegan 2023-08-21 14:12:35 -04:00
parent 1ef9941f2d
commit e76ddc2fe4
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E
2 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,8 @@
use time::PrimitiveDateTime as DateTime;
use time::Duration;
// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
unimplemented!("What time is a gigasecond later than {}", start);
let gigasec:i64 = 1000000000;
start.saturating_add(Duration::seconds(gigasec))
}

View file

@ -20,7 +20,6 @@ fn test_date() {
}
#[test]
#[ignore]
fn test_another_date() {
let start_date = dt(1977, 6, 13, 0, 0, 0);
@ -28,7 +27,6 @@ fn test_another_date() {
}
#[test]
#[ignore]
fn test_third_date() {
let start_date = dt(1959, 7, 19, 0, 0, 0);
@ -36,7 +34,6 @@ fn test_third_date() {
}
#[test]
#[ignore]
fn test_datetime() {
let start_date = dt(2015, 1, 24, 22, 0, 0);
@ -44,7 +41,6 @@ fn test_datetime() {
}
#[test]
#[ignore]
fn test_another_datetime() {
let start_date = dt(2015, 1, 24, 23, 59, 59);