MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_git_timestamp_datetime

Function get_git_timestamp_datetime

crates/vm/src/version.rs:101–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99}
100
101fn get_git_timestamp_datetime() -> DateTime<Local> {
102 let timestamp = option_env!("RUSTPYTHON_GIT_TIMESTAMP")
103 .unwrap_or("")
104 .to_owned();
105 let timestamp = timestamp.parse::<u64>().unwrap_or(0);
106
107 let datetime = UNIX_EPOCH + Duration::from_secs(timestamp);
108
109 datetime.into()
110}
111
112pub fn get_git_date() -> String {
113 let datetime = get_git_timestamp_datetime();

Callers 2

get_git_dateFunction · 0.85
get_git_timeFunction · 0.85

Calls 1

to_ownedMethod · 0.45

Tested by

no test coverage detected