Fix position time zone problem in PostgreSQL, fixes #123

This commit is contained in:
Bartek Fabiszewski 2020-06-04 21:45:15 +02:00
parent 55e5319f19
commit fb29f45f47

View File

@ -159,7 +159,7 @@ require_once(ROOT_DIR . "/helpers/utils.php");
return "UNIX_TIMESTAMP($column)"; return "UNIX_TIMESTAMP($column)";
break; break;
case "pgsql": case "pgsql":
return "EXTRACT(EPOCH FROM $column)"; return "EXTRACT(EPOCH FROM $column::TIMESTAMP WITH TIME ZONE)";
break; break;
case "sqlite": case "sqlite":
return "STRFTIME('%s', $column)"; return "STRFTIME('%s', $column)";