Fix for test failing on January 29th: advance months using timeutil, not AddDate. (#10808)

This commit is contained in:
Mark Gritter 2021-01-29 11:48:22 -06:00 committed by GitHub
parent 936ce3ba62
commit ce858de180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1770,8 +1770,8 @@ func TestActivityLog_EndOfMonth(t *testing.T) {
month0 := time.Now().UTC()
segment0 := a.GetStartTimestamp()
month1 := month0.AddDate(0, 1, 0)
month2 := month0.AddDate(0, 2, 0)
month1 := timeutil.StartOfNextMonth(month0)
month2 := timeutil.StartOfNextMonth(month1)
// Trigger end-of-month
a.HandleEndOfMonth(month1)