(time: git2::Time)
| 126 | } |
| 127 | |
| 128 | fn format_git_time(time: git2::Time) -> String { |
| 129 | let timestamp = time.seconds(); |
| 130 | if let Some(dt) = Utc.timestamp_opt(timestamp, 0).single() { |
| 131 | dt.format("%Y-%m-%d %H:%M:%S").to_string() |
| 132 | } else { |
| 133 | timestamp.to_string() |
| 134 | } |
| 135 | } |