summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochan Lee <wc0917.lee@samsung.com>2017-06-01 15:25:22 +0900
committerWoochan Lee <wc0917.lee@samsung.com>2017-06-01 15:30:18 +0900
commiteacebda8257d6f705255f51d57a16726cd15b52d (patch)
tree390c3c8c4686e9048929dbae1a5d38e1debb7cb7
parent8a85c997c7ca7f3edcedbc5ab8a2b7f6d923682b (diff)
downloadefl-modules-accepted/tizen_unified.tar.gz
efl-modules-accepted/tizen_unified.tar.bz2
efl-modules-accepted/tizen_unified.zip
Add 12 hours on existing Udate has problem. Change-Id: If30f9161e7af22a07af8d8bca5b3a0c8f9f1b437
-rwxr-xr-xdatetime_input_spinner/datetime_input_spinner.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/datetime_input_spinner/datetime_input_spinner.c b/datetime_input_spinner/datetime_input_spinner.c
index 87a71bb..d56504a 100755
--- a/datetime_input_spinner/datetime_input_spinner.c
+++ b/datetime_input_spinner/datetime_input_spinner.c
@@ -188,7 +188,6 @@ _ampm_text_set(Input_Spinner_Module_Data *layout_mod)
ucal_setDateTime(calendar, 1900 + curr_time.tm_year, UCAL_JANUARY + curr_time.tm_mon,
curr_time.tm_mday, 0, curr_time.tm_min, 0, &status);
date = ucal_getMillis(calendar, &status);
- ucal_close(calendar);
u_uastrcpy(pattern, "a");
dt_formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, pattern, -1, &status);
@@ -204,7 +203,12 @@ _ampm_text_set(Input_Spinner_Module_Data *layout_mod)
elm_object_text_set(layout_mod->am_button, buf);
- date += 12 * 60 * 60 * 1000;
+ ucal_clear(calendar);
+ ucal_setDateTime(calendar, 1900 + curr_time.tm_year, UCAL_JANUARY + curr_time.tm_mon,
+ curr_time.tm_mday, 12, curr_time.tm_min, 0, &status);
+ date = ucal_getMillis(calendar, &status);
+ ucal_close(calendar);
+
udat_format(dt_formatter, date, result, sizeof(result), NULL, &status);
u_austrcpy(buf, result);
udat_close(dt_formatter);