Commit e55fc1b3 authored by Simon Morlat's avatar Simon Morlat

fix bug when writing date of February 29.

parent dcdc8efa
......@@ -354,7 +354,7 @@ issize_t msg_date_e(char b[], isize_t bsiz, msg_time_t http_date)
while (day >= days_per_month) {
day -= days_per_month;
month++;
days_per_month = days_per_months[month] + (leap_year && month == 2);
days_per_month = days_per_months[month] + (leap_year && month == 1);
}
return snprintf(b, bsiz, "%s, %02ld %s %04ld %02ld:%02ld:%02ld GMT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment