1 #include <system_settings.h>
4 void item_set_local_timezone(Evas_Object *item)
6 /* http://tizen.org/privilege/systemsettings */
7 char *timezone_str = NULL;
8 struct tm *local_time = NULL;
10 int ret = SYSTEM_SETTINGS_ERROR_NONE;
12 char time_result[PATH_LEN] = {0, };
14 local_time = localtime(&t);
17 ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, &timezone_str);
18 if (ret != SYSTEM_SETTINGS_ERROR_NONE)
19 _E("cannot get the timezone string");
25 if (local_time->tm_gmtoff >= 0)
26 snprintf(time_result, sizeof(time_result), "%s, +%d", timezone_str, local_time->tm_gmtoff / 3600);
28 snprintf(time_result, sizeof(time_result), "%s, %d", timezone_str, local_time->tm_gmtoff / 3600);