mirror of
https://github.com/aljazceru/khatru.git
synced 2026-01-10 00:44:24 +01:00
fix: pass unix timestamp to DB.Exec instead of Time
This commit is contained in:
@@ -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
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user