Index: ext/date/lib/tm2unixtime.c =================================================================== --- ext/date/lib/tm2unixtime.c (revision 293857) +++ ext/date/lib/tm2unixtime.c (working copy) @@ -45,34 +45,17 @@ { timelib_sll leapyear; timelib_sll days_this_month; - timelib_sll next_month, next_year; - timelib_sll days_next_month; do_range_limit(1, 13, 12, base_m, base_y); leapyear = timelib_is_leap(*base_y); days_this_month = leapyear ? days_in_month_leap[*base_m] : days_in_month[*base_m]; - next_month = (*base_m) + 1; - if (next_month > 12) { - next_month -= 12; - next_year = (*base_y) + 1; - } else { - next_year = (*base_y); - } - leapyear = timelib_is_leap(next_year); - days_next_month = leapyear ? days_in_month_leap[next_month] : days_in_month[next_month]; - if (*d < 0) { *d += days_this_month; (*m)--; return 1; } - if (*d > days_next_month) { - *d -= days_next_month; - (*m)++; - return 1; - } return 0; }