Update query for pg

This commit is contained in:
Chongyi Zheng 2023-09-15 17:59:19 -04:00
parent f00d24c661
commit 6ffa4b707b
No known key found for this signature in database
GPG key ID: E3C2287691E40E35

View file

@ -707,8 +707,10 @@ class Database {
static sqlHourOffset() {
if (Database.dbConfig.type === "sqlite") {
return "DATETIME('now', ? || ' hours')";
} else {
} else if (Database.dbConfig.type.endsWith("mariadb")) {
return "DATE_ADD(NOW(), INTERVAL ? HOUR)";
} else if (Database.dbConfig.type === "postgres") {
return "NOW() + INTERVAL '? HOUR'";
}
}