access /etc/localtime by vconf, not by symlink 29/50129/2 accepted/tizen/mobile/20151026.051821 accepted/tizen/tv/20151026.051841 accepted/tizen/wearable/20151026.051907 submit/tizen/20151026.012312
authorMyoungJune Park <mj2004.park@samsung.com>
Sat, 24 Oct 2015 05:31:19 +0000 (14:31 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Mon, 26 Oct 2015 01:08:40 +0000 (10:08 +0900)
Change-Id: I3430c04a5168cd83281724301dd031c9b405ac13
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
src/system_setting_platform.c

index 20d0b16..c9b0db1 100644 (file)
@@ -1582,9 +1582,11 @@ int system_setting_unset_changed_callback_locale_timeformat_24hour(system_settin
        return system_setting_vconf_unset_changed_cb(VCONFKEY_REGIONFORMAT_TIME1224, 3);
 }
 
+       //VCONFKEY_SETAPPL_TIMEZONE_ID
 int system_setting_get_locale_timezone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
 {
        SETTING_TRACE_BEGIN;
+#if 0
        char tzpath[256];
        ssize_t len = readlink(SETTING_TZONE_SYMLINK_PATH, tzpath, sizeof(tzpath) - 1);
        if (len != -1) {
@@ -1593,10 +1595,12 @@ int system_setting_get_locale_timezone(system_settings_key_e key, system_setting
                SETTING_TRACE("parse error for SETTING_TZONE_SYMLINK_PATH");
                return SYSTEM_SETTINGS_ERROR_IO_ERROR;
        }
-
        /* "/usr/share/zoneinfo/Asia/Seoul" */
        SETTING_TRACE("tzpath : %s ", &tzpath[20]);
        *value = strdup(&tzpath[20]);
+#else
+       *value = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);
+#endif
        return SYSTEM_SETTINGS_ERROR_NONE;
 }