Tizen 2.0 Release
[apps/home/settings.git] / setting-time / src / setting-time-engine.c
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://floralicense.org/license/
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #include <setting-time-engine.h>
18
19 /*  To set system time takes some time. It makes some time before firing vconf event */
20 int setting_time_update_cb(void *data)
21 {
22         retv_if(data == NULL, -1);
23         SettingTimeUG *ad = data;
24         /*
25         char time_str[SETTING_TIME_ENGINE_TIME_STR_LEN];
26         struct tm *ts;
27         struct tm ts_ret;
28         time_t ctime;
29         // get time from datefield UI
30         ctime = ad->changed_time;
31         //ctime = time(NULL);
32         ts = localtime_r(&ctime, &ts_ret);
33         retv_if(!ts, 1);
34         strftime(time_str, SETTING_TIME_ENGINE_TIME_STR_LEN, "%H:%M", &ts_ret);
35         SETTING_TRACE("After setting time ::: tm is_dst --> %d", ts_ret.tm_isdst);
36         SETTING_TRACE("After Setting time time_str:%s", time_str);*/
37 #if SUPPORT_SCREEN_PROTECTED
38         pm_unlock_state(LCD_NORMAL, STAY_CUR_STATE);
39 #endif
40
41         if (ad->pop_progress) {
42                 evas_object_del(ad->pop_progress);
43                 ad->pop_progress = NULL;
44         }
45         return 0;
46 }