diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-07 02:44:32 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-07 02:44:32 +0800 |
| commit | 91e847bf873ff2e404554ea7bb97fad7beac0530 (patch) | |
| tree | 0821d32fd5bbd8ecb1f9213a7364c6bf35ba0f05 /mling/build.rs | |
| parent | 7a8d069723d7120f74c099c2c1fe508a3513ed85 (diff) | |
Fix date format padding in version string
Diffstat (limited to 'mling/build.rs')
| -rw-r--r-- | mling/build.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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})"); |
