Fix digest end date to not overlap with the next digest period.

Apparently the since/until repository timestamp limits denote a closed interval,
so commits made at midnight would appear twice. Switch to setting the end date
to being one second earlier.
This commit is contained in:
Mihai Parparita 2015-09-06 22:40:58 -07:00
parent 112ddb2b02
commit 012d736e25

View file

@ -194,7 +194,7 @@ func newDigest(c appengine.Context, githubClient *github.Client, account *Accoun
if account.Frequency == "weekly" {
daysInDigest = 7
}
digestEndTime := digestStartTime.AddDate(0, 0, daysInDigest)
digestEndTime := digestStartTime.AddDate(0, 0, daysInDigest).Add(-time.Second)
// Only look at repos that may have activity in the digest interval.
var intervalRepos []*Repo