Fill DST flag in birhday structs to fix calculation of age.
authorRoman Moravcik <roman.moravcik@gmail.com>
Thu, 14 Oct 2010 10:43:01 +0000 (12:43 +0200)
committerRoman Moravcik <roman.moravcik@gmail.com>
Thu, 14 Oct 2010 10:43:01 +0000 (12:43 +0200)
src/birthday.c

index b424e74..8799859 100644 (file)
@@ -275,6 +275,7 @@ calc_age (EContactDate *bdate, time_t current_date)
        bday_tm.tm_mday = bdate->day;
        bday_tm.tm_mon = bdate->month - 1;
        bday_tm.tm_year = current_date_tm->tm_year;
        bday_tm.tm_mday = bdate->day;
        bday_tm.tm_mon = bdate->month - 1;
        bday_tm.tm_year = current_date_tm->tm_year;
+       bday_tm.tm_isdst = current_date_tm->tm_isdst;
 
        if (mktime (&bday_tm) > current_date) {
                age = (current_date_tm->tm_year + 1900) - bdate->year - 1;
 
        if (mktime (&bday_tm) > current_date) {
                age = (current_date_tm->tm_year + 1900) - bdate->year - 1;