timestamps written into the database should really be UTC

This commit is contained in:
2025-10-13 15:31:43 -06:00
parent abd14ea24e
commit 55f5cc5eca
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func AmTestIPBan(ip_address string) (string, error) {
rows, err := amdb.Query(`
SELECT message FROM ipban WHERE (address_lo & mask_lo) = (? & mask_lo)
AND (address_hi & mask_hi) = (? & mask_hi) AND (expire IS NULL OR expire >= ?)
AND enable <> 0 ORDER BY mask_hi DESC, mask_lo DESC`, iv_lo, iv_hi, time.Now())
AND enable <> 0 ORDER BY mask_hi DESC, mask_lo DESC`, iv_lo, iv_hi, time.Now().UTC())
if err != nil {
return "", err
}