Elm_datetime bug fix patch: Max days in a month is giving wrong values because of summer time adjustment

This commit is contained in:
ChunEon Park 2013-08-09 02:59:48 +09:00
parent cb8d4790e6
commit 5194da10b3
1 changed files with 3 additions and 0 deletions

View File

@ -576,6 +576,9 @@ _max_days_get(int year,
localtime_r(&t, &time1);
time1.tm_year = year;
time1.tm_mon = month;
/* 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++)
{