Skip to main content

parse_timestamp

Function parse_timestamp 

Source
pub fn parse_timestamp(input: &str) -> Result<i64, Error>
Available on crate feature vcs-git only.
Expand description

Parse an --as-of timestamp into Unix seconds.

Accepts RFC 3339 / ISO 8601, a bare @<unix> epoch, and the git date spellings gix understands. Front ends use this to fill Options::as_of for reproducible snapshots.

ยงErrors

Returns Error::InvalidTimestamp when the input is unparseable.