index : gitrs
A lightweight web interface for browsing Git repositories, implemented in Rust
about summary refs log tree commit diff

Diffstat (limited to 'src/time.rs')

-rw-r--r-- src/time.rs 4
 1 file changed, 4 insertions(+)

diff --git a/src/time.rs b/src/time.rs
index 0eb01bc..53a33d4 100644
--- a/src/time.rs
+++ b/src/time.rs
@@ -31,6 +31,10 @@
        Self { gix }
    }

    pub fn seconds(&self) -> i64 {
        self.gix.seconds
    }

    pub fn format(&self) -> String {
        let dt: DateTime<Utc> = Utc.timestamp_opt(self.gix.seconds, 0).unwrap();
        let offset = FixedOffset::east_opt(self.gix.offset).unwrap();