Skip to content

Commit

Permalink
geocode: also show formatted created_at date along with age after s…
Browse files Browse the repository at this point in the history
…uccessfully loading the geonames index
  • Loading branch information
jqnatividad committed Dec 31, 2023
1 parent e2d396d commit ea9aa42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/geocode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1386,8 +1386,10 @@ async fn load_engine(geocode_index_file: PathBuf, progressbar: &ProgressBar) ->
if let Some(metadata) = &engine.metadata {
let now = std::time::SystemTime::now();
let age = now.duration_since(metadata.created_at).unwrap();
let created_at_formatted = util::format_systemtime(metadata.created_at, "%+");

progressbar.println(format!(
"Geonames index loaded. Age: {}",
"Geonames index loaded. Created: {created_at_formatted} Age: {}",
indicatif::HumanDuration(age)
));
}
Expand Down

0 comments on commit ea9aa42

Please sign in to comment.