[sysprof] display: show time in local time
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] display: show time in local time
- Date: Fri, 29 Oct 2021 02:01:27 +0000 (UTC)
commit 66d412b23571d5f58e252cb74b2d0b1001b8bbc1
Author: Christian Hergert <chergert redhat com>
Date: Thu Oct 28 19:01:18 2021 -0700
display: show time in local time
Fixes #67
src/libsysprof-ui/sysprof-display.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-display.c b/src/libsysprof-ui/sysprof-display.c
index 43b8a7d0..b2ba2bc5 100644
--- a/src/libsysprof-ui/sysprof-display.c
+++ b/src/libsysprof-ui/sysprof-display.c
@@ -253,7 +253,14 @@ sysprof_display_dup_title (SysprofDisplay *self)
if ((dt = g_date_time_new_from_iso8601 (capture_time, NULL)))
{
- g_autofree gchar *formatted = g_date_time_format (dt, "%X");
+ g_autoptr(GDateTime) local = g_date_time_to_local (dt);
+ g_autofree gchar *formatted = NULL;
+
+ if (local != NULL)
+ formatted = g_date_time_format (local, "%X");
+ else
+ formatted = g_date_time_format (dt, "%X");
+
/* translators: %s is replaced with locale specific time of recording */
return g_strdup_printf (_("Recording at %s"), formatted);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]