We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4dd079 commit 2a8e44bCopy full SHA for 2a8e44b
src/lib.rs
@@ -627,7 +627,30 @@ fn write_dependencies(manifest_location: &path::Path, w: &mut fs::File) -> io::R
627
628
#[cfg(feature = "chrono")]
629
fn write_time(w: &mut fs::File) -> io::Result<()> {
630
+ use chrono::Datelike;
631
+
632
let now = chrono::offset::Utc::now();
633
+ write_variable!(
634
+ w,
635
+ "BUILT_TIME_YEAR",
636
+ "i32",
637
+ now.year(),
638
+ "The build time year, UTC."
639
+ );
640
641
642
+ "BUILT_TIME_MONTH",
643
+ "u32",
644
+ now.month(),
645
+ "The build time month, UTC."
646
647
648
649
+ "BUILT_TIME_DAY",
650
651
+ now.day(),
652
+ "The build time day, UTC."
653
654
write_str_variable!(
655
w,
656
"BUILT_TIME_UTC",
0 commit comments