Fix Time#advance to work with dates before 1001-03-07
#35659

pixeltrix wants to merge fix-time-advance-with-historical-dates into master

We do not currently have an analysis of these two commits