[elm_datetime bug fix] max days in a month should return correct value in all locales...
authorsumanth <sumanth.m@samsung.com>
Thu, 8 Aug 2013 09:25:57 +0000 (14:55 +0530)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 12 Aug 2013 02:02:26 +0000 (11:02 +0900)
Change-Id: I525a489c241808d5beb027827711fbb6a854418a

src/lib/elm_datetime.c
src/modules/datetime_input_popup/datetime_input_popup.c

index 3532936..62eeade 100644 (file)
@@ -611,9 +611,9 @@ _max_days_get(int year,
    localtime_r(&t, &time1);
    time1.tm_year = year;
    time1.tm_mon = month;
-   /* To restrict month wrapping because of day light saving mode in some locales,
-      set the time as 0 hr */
-   time1.tm_hour = 0;
+   /* FIXME: To restrict month wrapping because of summer time in some locales,
+    * disable day light saving mode. */
+   time1.tm_isdst = 0;
    for (day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max;
         day++)
      {
index 28762c5..fd72c25 100644 (file)
@@ -328,9 +328,11 @@ _set_datepicker_popup_title_text(Popup_Module_Data *popup_mod)
    set_time.tm_year = (popup_mod->set_time).tm_year;
    set_time.tm_mon = (popup_mod->set_time).tm_mon;
    set_time.tm_mday = (popup_mod->set_time).tm_mday;
-   set_time.tm_hour = 0;
+   /* FIXME: To restrict month wrapping because of summer time in some locales,
+    * disable day light saving mode. */
+   set_time.tm_isdst = 0;
    mktime(&set_time);
-   strftime(title, BUFF_SIZE, "%x, %a", &set_time);
+   strftime(title, BUFF_SIZE, "%a %x", &set_time);
    elm_object_part_text_set(popup_mod->popup, "title,text", title);
 }