diff options
Diffstat (limited to 'src/clock.c')
-rw-r--r-- | src/clock.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/clock.c b/src/clock.c index 2d3d4c07..1a1dfe88 100644 --- a/src/clock.c +++ b/src/clock.c @@ -288,6 +288,21 @@ static GDBusSignalTable clock_signals[] = { static DBusConnection *connection = NULL; +void __connman_clock_update_timezone(void) +{ + DBG(""); + + g_free(timezone_config); + timezone_config = __connman_timezone_lookup(); + + if (timezone_config == NULL) + return; + + connman_dbus_property_changed_basic(CONNMAN_MANAGER_PATH, + CONNMAN_CLOCK_INTERFACE, "Timezone", + DBUS_TYPE_STRING, &timezone_config); +} + int __connman_clock_init(void) { DBG(""); @@ -296,6 +311,8 @@ int __connman_clock_init(void) if (connection == NULL) return -1; + __connman_timezone_init(); + timezone_config = __connman_timezone_lookup(); g_dbus_register_interface(connection, CONNMAN_MANAGER_PATH, @@ -318,6 +335,8 @@ void __connman_clock_cleanup(void) dbus_connection_unref(connection); + __connman_timezone_cleanup(); + g_free(timezone_config); g_strfreev(timeservers_config); } |