MCPcopy Create free account
hub / github.com/douglance/devsql / format_git_time

Function format_git_time

crates/vcsql/src/providers/stashes.rs:82–89  ·  view source on GitHub ↗
(time: git2::Time)

Source from the content-addressed store, hash-verified

80}
81
82fn format_git_time(time: git2::Time) -> String {
83 let timestamp = time.seconds();
84 if let Some(dt) = Utc.timestamp_opt(timestamp, 0).single() {
85 dt.format("%Y-%m-%d %H:%M:%S").to_string()
86 } else {
87 timestamp.to_string()
88 }
89}

Callers 1

populateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected