oops, reversed dates

This commit is contained in:
Ted Unangst 2020-09-11 12:38:23 -04:00
parent c2e3c2072f
commit d79a5ff188
1 changed files with 2 additions and 2 deletions

View File

@ -236,8 +236,8 @@ func gethonksfromlongago(userid int64, wanted int64) []*Honk {
now := time.Now().UTC() now := time.Now().UTC()
now = time.Date(now.Year() - 1, now.Month(), now.Day(), now.Hour(), now.Minute(), now = time.Date(now.Year() - 1, now.Month(), now.Day(), now.Hour(), now.Minute(),
now.Second(), 0, now.Location()) now.Second(), 0, now.Location())
dt1 := now.Add(12 * time.Hour).Format(dbtimeformat) dt1 := now.Add(-36 * time.Hour).Format(dbtimeformat)
dt2 := now.Add(-36 * time.Hour).Format(dbtimeformat) dt2 := now.Add(12 * time.Hour).Format(dbtimeformat)
rows, err := stmtHonksFromLongAgo.Query(wanted, userid, dt1, dt2, userid) rows, err := stmtHonksFromLongAgo.Query(wanted, userid, dt1, dt2, userid)
return getsomehonks(rows, err) return getsomehonks(rows, err)
} }