Function build_data::set_SOURCE_TIMESTAMP[][src]

pub fn set_SOURCE_TIMESTAMP()

Sets the SOURCE_TIMESTAMP env variable.

Call this from build.rs. Use env! in your main.rs to use the variable.

Example value: "2021-04-14T03:25:07Z"

Panics

Panics if SOURCE_DATE_EPOCH env var is set to a non-integer value. Panics if it fails to get the timestamp from git.