fix sync_bill_date near the end of the month, RT#10503