fix: pass unix timestamp to DB.Exec instead of Time

This commit is contained in:
0x0ff
2022-12-29 15:10:14 +01:00
committed by fiatjaf
parent af890590f3
commit 9ba4326085
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ func (r *Relay) Init() error {
for {
time.Sleep(60 * time.Minute)
db.DB.Exec(`DELETE FROM event WHERE created_at < $1`, time.Now().AddDate(0, -3, 0)) // 3 months
db.DB.Exec(`DELETE FROM event WHERE created_at < $1`, time.Now().AddDate(0, -3, 0).Unix()) // 3 months
}
}()