From 0716e23fb4fab9784ec4920bff4a21ec90a1a6f3 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Thu, 8 Aug 2019 16:08:00 -0700 Subject: [PATCH] libsysprof-capture: use GDateTime instead of GTimeVal --- src/libsysprof-capture/sysprof-capture-writer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsysprof-capture/sysprof-capture-writer.c b/src/libsysprof-capture/sysprof-capture-writer.c index 351301ce..6c9362ec 100644 --- a/src/libsysprof-capture/sysprof-capture-writer.c +++ b/src/libsysprof-capture/sysprof-capture-writer.c @@ -462,9 +462,9 @@ sysprof_capture_writer_new_from_fd (int fd, gsize buffer_size) { g_autofree gchar *nowstr = NULL; + g_autoptr(GDateTime) now = NULL; SysprofCaptureWriter *self; SysprofCaptureFileHeader *header; - GTimeVal tv; gsize header_len = sizeof(*header); if (fd < 0) @@ -486,8 +486,8 @@ sysprof_capture_writer_new_from_fd (int fd, self->len = buffer_size; self->next_counter_id = 1; - g_get_current_time (&tv); - nowstr = g_time_val_to_iso8601 (&tv); + now = g_date_time_new_now_local (); + nowstr = g_date_time_format_iso8601 (now); header = sysprof_capture_writer_allocate (self, &header_len);