From fb29f45f473239f918507f7aa3644849830ab8bf Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Thu, 4 Jun 2020 21:45:15 +0200 Subject: [PATCH] Fix position time zone problem in PostgreSQL, fixes #123 --- helpers/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/db.php b/helpers/db.php index 2547087..49105e0 100644 --- a/helpers/db.php +++ b/helpers/db.php @@ -159,7 +159,7 @@ require_once(ROOT_DIR . "/helpers/utils.php"); return "UNIX_TIMESTAMP($column)"; break; case "pgsql": - return "EXTRACT(EPOCH FROM $column)"; + return "EXTRACT(EPOCH FROM $column::TIMESTAMP WITH TIME ZONE)"; break; case "sqlite": return "STRFTIME('%s', $column)";