From 91e847bf873ff2e404554ea7bb97fad7beac0530 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 7 Jun 2026 02:44:32 +0800 Subject: Fix date format padding in version string --- mling/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mling/build.rs') diff --git a/mling/build.rs b/mling/build.rs index cec5b14..5e210eb 100644 --- a/mling/build.rs +++ b/mling/build.rs @@ -29,7 +29,7 @@ fn build_version_info() { // Get date from git commit, fallback to current date let date = Command::new("git") - .args(["log", "-1", "--format=%ad", "--date=format:%Y-%-m-%-d"]) + .args(["log", "-1", "--format=%ad", "--date=format:%Y-%m-%d"]) .output() .ok() .and_then(|output| { @@ -40,7 +40,7 @@ fn build_version_info() { } }) .map(|s| s.trim().to_string()) - .unwrap_or_else(|| chrono::Local::now().format("%Y-%-m-%-d").to_string()); + .unwrap_or_else(|| chrono::Local::now().format("%Y-%m-%d").to_string()); let version_string = format!("mling {version} ({commit_hash} {date})"); -- cgit