From 1a497564e096bb3f52fe0c7a8d73fcbf1ede59f4 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Sat, 25 Jan 2025 01:18:58 +0530 Subject: [PATCH] sysprof:fix UTC recording time to local --- src/libsysprof/sysprof-document.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libsysprof/sysprof-document.c b/src/libsysprof/sysprof-document.c index adddce67..41dca004 100644 --- a/src/libsysprof/sysprof-document.c +++ b/src/libsysprof/sysprof-document.c @@ -2475,7 +2475,10 @@ sysprof_document_dup_title (SysprofDocument *self) return g_strdup (self->title); if ((date_time = g_date_time_new_from_iso8601 (self->header.capture_time, NULL))) - return g_date_time_format (date_time, _("Recording at %X %x")); + { + date_time = g_date_time_to_local(date_time); + return g_date_time_format (date_time, _("Recording at %X %x")); + } return g_strdup_printf (_("Recording at %s"), self->header.capture_time); } @@ -2491,7 +2494,10 @@ sysprof_document_dup_subtitle (SysprofDocument *self) return NULL; if ((date_time = g_date_time_new_from_iso8601 (self->header.capture_time, NULL))) - return g_date_time_format (date_time, _("Recording at %X %x")); + { + date_time = g_date_time_to_local(date_time); + return g_date_time_format (date_time, _("Recording at %X %x")); + } return g_strdup_printf (_("Recording at %s"), self->header.capture_time); }