[gnome-logs/wip/field-length: 4/4] Use locale format when displaying event timestamp
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/field-length: 4/4] Use locale format when displaying event timestamp
- Date: Thu, 24 Oct 2013 08:34:15 +0000 (UTC)
commit 40661e5d3f989305a51e4e54eafbfa8a81882fef
Author: David King <davidk gnome org>
Date: Wed Oct 23 20:26:32 2013 +0100
Use locale format when displaying event timestamp
https://bugzilla.gnome.org/show_bug.cgi?id=710728
src/gl-util.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gl-util.c b/src/gl-util.c
index 1db8f67..210568b 100644
--- a/src/gl-util.c
+++ b/src/gl-util.c
@@ -34,6 +34,7 @@ gchar *
gl_util_timestamp_to_display (guint64 microsecs)
{
GDateTime *datetime;
+ GDateTime *local;
gchar *time = NULL;
datetime = g_date_time_new_from_unix_utc (microsecs / G_TIME_SPAN_SECOND);
@@ -44,9 +45,11 @@ gl_util_timestamp_to_display (guint64 microsecs)
goto out;
}
- /* TODO: Localize? */
- time = g_date_time_format (datetime, "%F %T");
+ local = g_date_time_to_local (datetime);
+ time = g_date_time_format (local, "%c");
+
g_date_time_unref (datetime);
+ g_date_time_unref (local);
if (time == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]