It's best to use Time.zone.local(year).beginning_of_year and Time.zone.local(year).end_of_year to ensure time zone is considered.