gchar *security_type;
gboolean favorite;
gboolean autoconnect;
- GTimeVal modified;
gchar *is_hidden;
gboolean is_created;
gchar *proxy_address;
g_key_file_set_boolean(keyfile, group_name, WIFI_CONFIG_FAVORITE, conf->favorite);
g_key_file_set_boolean(keyfile, group_name, WIFI_CONFIG_AUTOCONNECT, conf->autoconnect);
- g_get_current_time(&conf->modified);
- gchar *str = g_time_val_to_iso8601(&conf->modified);
+
+#if GLIB_CHECK_VERSION(2,62,0)
+ gint64 real_time = 0;
+ GDateTime *dt_real_time = NULL;
+
+ real_time = g_get_real_time();
+ dt_real_time = g_date_time_new_from_unix_utc(real_time);
+ if (dt_real_time) {
+ gchar *str = g_date_time_format_iso8601(dt_real_time);
+ g_date_time_unref(dt_real_time);
+ if (str) {
+ g_key_file_set_string(keyfile, group_name,
+ WIFI_CONFIG_MODIFIED, str);
+ g_free(str);
+ }
+ }
+#else /* GLIB_CHECK_VERSION(2,62,0) */
+ GTimeVal modified;
+ g_get_current_time(&modified);
+ gchar *str = g_time_val_to_iso8601(&modified);
if (str) {
g_key_file_set_string(keyfile, group_name,
- WIFI_CONFIG_MODIFIED, str);
+ WIFI_CONFIG_MODIFIED, str);
g_free(str);
}
+#endif /* GLIB_CHECK_VERSION(2,62,0) */
/* Optional field */
if (conf->proxy_address != NULL) {