[gnome-commander] Fix display of modification time in file list - set it to local timezone



commit a4f787805d1c36f2be49378920c686e44384a496
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Feb 13 23:21:39 2022 +0100

    Fix display of modification time in file list - set it to local timezone

 src/utils.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/utils.cc b/src/utils.cc
index 8669ea74..071e917a 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -403,10 +403,13 @@ const gchar *time2string (GDateTime *gDateTime, const gchar *dateFormat)
 
     static gchar buf[64];
 
-    auto dateString = g_date_time_format (gDateTime, dateFormat);
+    auto localGDateTime = g_date_time_to_local (gDateTime);
+
+    auto dateString = g_date_time_format (localGDateTime, dateFormat);
 
     strncpy (buf, dateString, sizeof(buf)-1);
 
+    g_date_time_unref(localGDateTime);
     g_free (dateString);
 
     return buf;


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