Between interest dates and at year end
When bonds are sold after an interest date, the buyer pays the price plus the interest accrued since that date, and gets it back as part of the first full coupon. The issuer records the accrued amount received as interest payable or as a credit to interest expense, so its expense covers only the time the bonds were outstanding. At a year end that falls between payment dates, the issuer accrues interest, and amortizes the discount or premium, for the months since the last payment.