4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <setting-time-engine.h>
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)
26 /* time_t time_input = (time_t)data; */
28 char time_str[SETTING_TIME_ENGINE_TIME_STR_LEN];
33 retv_if(data == NULL, -1);
34 SettingTimeUG *ad = data;
36 // get time from datefield UI
37 ctime = ad->changed_time;
39 ts = localtime_r(&ctime, &ts_ret);
41 strftime(time_str, SETTING_TIME_ENGINE_TIME_STR_LEN, "%H:%M", &ts_ret);
42 SETTING_TRACE("After setting time ::: tm is_dst --> %d", ts_ret.tm_isdst);
43 SETTING_TRACE("After Setting time time_str:%s", time_str);
44 #if SUPPORT_SCREEN_PROTECTED
45 pm_unlock_state(LCD_NORMAL, STAY_CUR_STATE);
48 if (ad->pop_progress) {
49 evas_object_del(ad->pop_progress);
50 ad->pop_progress = NULL;