fix: unixtimestamp calculation from PostgreSQL

see https://stackoverflow.com/questions/29536542/different-results-for-extract-epoch-on-different-postgresql-servers
This commit is contained in:
n-peugnet 2022-04-28 14:21:43 +02:00
parent 64599f4cfe
commit ee19875c97

View file

@ -2266,7 +2266,7 @@ else {
{
switch ($this->rc->db->db_provider) {
case 'postgres':
return "EXTRACT (EPOCH FROM $field)";
return "EXTRACT (EPOCH FROM $field::timestamp without time zone)";
default:
return "UNIX_TIMESTAMP($field)";
}