comparison libpurple/protocols/oscar/userinfo.c @ 31415:729a3c968114

Ignore DST when calculating birthdays. This prevents an off-by-one-day condition. Fixes #13533. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author dzlists@arcor.de
date Thu, 24 Mar 2011 21:27:47 +0000
parents 1558900f47e5
children d4b7770324f8
comparison
equal deleted inserted replaced
31414:66f4511aab1d 31415:729a3c968114
435 435
436 tm->tm_mday = (int)info->birthday; 436 tm->tm_mday = (int)info->birthday;
437 tm->tm_mon = (int)info->birthmonth - 1; 437 tm->tm_mon = (int)info->birthmonth - 1;
438 tm->tm_year = (int)info->birthyear - 1900; 438 tm->tm_year = (int)info->birthyear - 1900;
439 439
440 /* Ignore dst setting of today to avoid timezone shift between
441 * dates in summer and winter time. */
442 tm->tm_isdst = -1;
443
440 /* To be 100% sure that the fields are re-normalized. 444 /* To be 100% sure that the fields are re-normalized.
441 * If you're sure strftime() ALWAYS does this EVERYWHERE, 445 * If you're sure strftime() ALWAYS does this EVERYWHERE,
442 * feel free to remove it. --rlaager */ 446 * feel free to remove it. --rlaager */
443 mktime(tm); 447 mktime(tm);
444 448