Remove use of deprecated glib type

This commit is contained in:
Tom Stellard 2020-09-11 15:12:19 -07:00
parent 10bd42a15e
commit f23d0a733a
1 changed files with 5 additions and 3 deletions

View File

@ -43,7 +43,7 @@ debug_print_message(gchar *format, ...)
gchar buf[SMALL];
const gchar *home;
FILE *fil = NULL;
GTimeVal logtime;
GDateTime *logtime;
gchar *logtime_string;
if(format != NULL)
@ -58,8 +58,10 @@ debug_print_message(gchar *format, ...)
if(debug_output != DEBUG_OUT_STDOUT)
{
g_get_current_time(&logtime);
logtime_string = g_time_val_to_iso8601(&logtime);
gint64 current_time = g_get_real_time();
logtime = g_date_time_new_from_unix_utc(current_time);
logtime_string = g_date_time_format_iso8601(logtime);
g_date_time_unref(logtime);
sprintf(text, "%s %s\n", logtime_string, buf);
g_free(logtime_string);