[gitg/fix-warnings: 2/7] Use timezone constructor




commit 8bece0737709b0930acfa3dc6a428852e091037a
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Tue Feb 15 01:08:22 2022 +0100

    Use timezone constructor

 libgitg/gitg-date.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/gitg-date.vala b/libgitg/gitg-date.vala
index efdb4fc7..9cbcb310 100644
--- a/libgitg/gitg-date.vala
+++ b/libgitg/gitg-date.vala
@@ -172,7 +172,7 @@ public class Date : Object, Initable
                if (tzs != null && tzs != "")
                {
                        var ret = new DateTime.from_unix_utc(unixt);
-                       return ret.to_timezone(new TimeZone(tzs));
+                       return ret.to_timezone(new TimeZone.identifier(tzs));
                }
                else
                {
@@ -202,7 +202,7 @@ public class Date : Object, Initable
 
                if (tzs != null && tzs != "")
                {
-                       tz = new TimeZone(tzs);
+                       tz = new TimeZone.identifier(tzs);
                }
                else
                {
@@ -249,7 +249,7 @@ public class Date : Object, Initable
 
                if (tzs != null && tzs != "")
                {
-                       tz = new TimeZone(tzs);
+                       tz = new TimeZone.identifier(tzs);
                }
                else
                {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]