(time: git2::Time)
| 80 | } |
| 81 | |
| 82 | fn 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 | } |