[seahorse] Common: use %x datetime format.



commit 4c5123b02bc4056eda9e85764f0d858ec414a52f
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Mar 12 22:05:15 2018 +0100

    Common: use %x datetime format.
    
    This way, we don't need to burden translators with something we can
    easily deduct ourselves from the locale.

 common/util.vala |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/common/util.vala b/common/util.vala
index b111e02..2e2846c 100644
--- a/common/util.vala
+++ b/common/util.vala
@@ -49,19 +49,12 @@ namespace Util {
                dialog.destroy();
        }
 
-       public string get_display_date_string (long time)
+       public string get_display_date_string (uint64 time)
        {
                if (time == 0)
                        return "";
-               var created_date = GLib.Date();
-               created_date.set_time_t (time);
-               var buffer = new char[128];
-               /* TRANSLATORS: this date (Year-month-day) is used to display
-                * when something happened, e.g. when a key was created. Feel
-                * free to put it in the correct order for your language.
-                */
-               created_date.strftime(buffer, _("%Y-%m-%d"));
-               return (string)buffer;
+               var created_date = new DateTime.from_unix_utc((int64) time);
+               return created_date.format("%x");
        }
 
        public Gtk.Builder load_built_contents(Gtk.Container? frame,


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