From ea9aa425956b085b4a8d1762166ced0a6d89a94c Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Sun, 31 Dec 2023 12:57:21 -0500 Subject: [PATCH] `geocode`: also show formatted created_at date along with age after successfully loading the geonames index --- src/cmd/geocode.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/geocode.rs b/src/cmd/geocode.rs index 2c4a150d1..b6a71d0a5 100644 --- a/src/cmd/geocode.rs +++ b/src/cmd/geocode.rs @@ -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) )); }