diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
| commit | a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (patch) | |
| tree | 6a32883bd916c4096357b35298beff6db8bcd0b5 /examples/C | |
| parent | 45e8e1149027529194982212c804c0468aa01d98 (diff) | |
New upstream version 1.25.90 upstream/1.25.90
Diffstat (limited to 'examples/C')
| -rw-r--r-- | examples/C/glib/list-connections-libnm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/C/glib/list-connections-libnm.c b/examples/C/glib/list-connections-libnm.c index 77d5dfb7..7bed0c01 100644 --- a/examples/C/glib/list-connections-libnm.c +++ b/examples/C/glib/list-connections-libnm.c @@ -30,10 +30,15 @@ show_connection (NMConnection *connection) s_con = nm_connection_get_setting_connection (connection); if (s_con) { + struct tm localtime_data; + /* Get various info from NMSettingConnection and show it */ timestamp = nm_setting_connection_get_timestamp (s_con); timestamp_str = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp); - strftime (timestamp_real_str, sizeof (timestamp_real_str), "%c", localtime ((time_t *) ×tamp)); + strftime (timestamp_real_str, + sizeof (timestamp_real_str), + "%c", + localtime_r ((time_t *) ×tamp, &localtime_data)); val1 = nm_setting_connection_get_id (s_con); val2 = nm_setting_connection_get_uuid (s_con); |