fix: add date to the version string on Mac

It doesn't support `--iso`
This commit is contained in:
Aleksey Kladov 2021-04-26 15:20:15 +03:00
parent 869ec5f97a
commit 4f9640ff39
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ fn commit_hash() -> Option<String> {
}
fn build_date() -> Option<String> {
output_to_string("date --iso --utc")
output_to_string("date --utc +%Y-%m-%d")
}
fn output_to_string(command: &str) -> Option<String> {

View File

@ -108,7 +108,7 @@ fn run_fuzzer() -> Result<()> {
}
fn date_iso() -> Result<String> {
let res = cmd!("date --iso --utc").read()?;
let res = cmd!("date --utc +%Y-%m-%d").read()?;
Ok(res)
}