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