Radish alpha
r
rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt
Git libraries for Radicle
Radicle
Git
git-commit: add Time accessors
Fintan Halpenny committed 3 years ago
commit a65ff27e2226958c3eb1a36b976ae071b8b81e6f
parent 79a9472
1 file changed +10 -0
modified git-commit/src/author.rs
@@ -33,6 +33,16 @@ impl Time {
    pub fn new(seconds: i64, offset: i32) -> Self {
        Self { seconds, offset }
    }
+

+
    /// Return the time, in seconds, since the epoch.
+
    pub fn seconds(&self) -> i64 {
+
        self.seconds
+
    }
+

+
    /// Return the timezone offset, in minutes.
+
    pub fn offset(&self) -> i32 {
+
        self.offset
+
    }
}

impl From<Time> for git2::Time {