+static void clock_properties_load(void)
+{
+ GKeyFile *keyfile;
+ char *str;
+ enum time_updates time_value;
+ enum timezone_updates timezone_value;
+
+ keyfile = __connman_storage_load_global();
+ if (!keyfile)
+ return;
+
+ str = g_key_file_get_string(keyfile, "global", "TimeUpdates", NULL);
+
+ time_value = string2time_updates(str);
+ if (time_value != TIME_UPDATES_UNKNOWN)
+ time_updates_config = time_value;
+
+ g_free(str);
+
+ str = g_key_file_get_string(keyfile, "global", "TimezoneUpdates",
+ NULL);
+
+ timezone_value = string2timezone_updates(str);
+ if (timezone_value != TIMEZONE_UPDATES_UNKNOWN)
+ timezone_updates_config = timezone_value;
+
+ g_free(str);
+
+ g_key_file_free(keyfile);
+}
+
+static void clock_properties_save(void)
+{
+ GKeyFile *keyfile;
+ const char *str;
+
+ keyfile = __connman_storage_load_global();
+ if (!keyfile)
+ keyfile = g_key_file_new();
+
+ str = time_updates2string(time_updates_config);
+ if (str)
+ g_key_file_set_string(keyfile, "global", "TimeUpdates", str);
+ else
+ g_key_file_remove_key(keyfile, "global", "TimeUpdates", NULL);
+
+ str = timezone_updates2string(timezone_updates_config);
+ if (str)
+ g_key_file_set_string(keyfile, "global", "TimezoneUpdates",
+ str);
+ else
+ g_key_file_remove_key(keyfile, "global", "TimezoneUpdates",
+ NULL);
+
+ __connman_storage_save_global(keyfile);
+
+ g_key_file_free(keyfile);
+}
+