Skip to content

Commit

Permalink
fixing datetime tuf specification
Browse files Browse the repository at this point in the history
  • Loading branch information
SequeI committed Nov 12, 2024
1 parent e8f453e commit 48eac07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuftool/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use crate::error::{self, Result};

use chrono::{DateTime, FixedOffset, TimeDelta, Utc};
use chrono::{DateTime, FixedOffset, TimeDelta,Timelike, Utc};
use snafu::{ensure, OptionExt, ResultExt};

/// Parses a user-specified datetime, either in full RFC 3339 format, or a shorthand like "in 7
Expand Down Expand Up @@ -71,6 +71,6 @@ pub(crate) fn parse_datetime(input: &str) -> Result<DateTime<Utc>> {
};

let now = Utc::now();
let then = now + duration;
let then = (now + duration).with_nanosecond(0).unwrap();
Ok(then)
}

0 comments on commit 48eac07

Please sign in to comment.