From e9709ed744d8a4df4d5134e768377f180ef93e12 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 26 Jan 2023 20:55:04 +0530 Subject: [PATCH] feat: formmatting is being deprecated --- build.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 4eb471e..2bb4f11 100644 --- a/build.rs +++ b/build.rs @@ -28,8 +28,13 @@ fn main() { let git_hash = String::from_utf8(output.stdout).unwrap(); println!("cargo:rustc-env=GIT_HASH={}", git_hash); - let now = OffsetDateTime::now_utc().format("%y-%m-%d"); - println!("cargo:rustc-env=COMPILED_DATE={}", &now); + let now = OffsetDateTime::now_utc(); + println!( + "cargo:rustc-env=COMPILED_DATE={}-{}-{}", + now.year(), + now.month(), + now.day() + ); cache_bust(); }