pub fn get_source_time() -> Result<u64, String>Expand description
Gets the modification time of the source code.
Reads the
SOURCE_DATE_EPOCH
env var if set. Otherwise, runs git to get the value.
§Errors
Returns an error when:
SOURCE_DATE_EPOCHis non-empty and cannot be parsed as ani64.- it failed to execute
git gitexited with non-zero statusgitwrote stdout data that cannot be parsed as ani64.
§Panics
Panics if git writes non-UTF bytes to stdout.