From 11e4b10f671f3baf0630bb444c075fa6c9b110af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= <hub@figuiere.net>
Date: Mon, 13 Dec 2021 23:56:32 -0500
Subject: [PATCH] Expose timezone info from XmpDateTime

---
 src/lib.rs | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/lib.rs b/src/lib.rs
index 7297a04..7a75251 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -171,6 +171,26 @@ impl DateTime {
     pub fn nano_second(&self) -> i32 {
         self.0.nano_second
     }
+
+    /// Return if there is a timezone information
+    pub fn has_tz(&self) -> bool {
+        self.0.has_tz != 0
+    }
+
+    /// Return the timezone sign
+    pub fn tz_sign(&self) -> TzSign {
+        self.0.tz_sign
+    }
+
+    /// Return the timezone offset hours (absolute)
+    pub fn tz_hours(&self) -> i32 {
+        self.0.tz_hour
+    }
+
+    /// Return the timezone offset minutes
+    pub fn tz_minutes(&self) -> i32 {
+        self.0.tz_minute
+    }
 }
 
 impl From<c::XmpDateTime> for DateTime {
-- 
GitLab