mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-10-18 19:10:31 +08:00
Merge remote-tracking branch 'origin/commit/time-accessors'
* origin/commit/time-accessors: git-commit: add Time accessors Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user