FIX #3372 - Printing issue with Postgres and dates (SQL format)

After connecting to the database, we force datestyle to "ISO, YMD", so dates returned by the db will have a format compatible with Dolibarr functions.
This will fix dates printing issues in mostly all pages, with a postgres db configured with "SQL, DMY" as default.
This commit is contained in:
tomours 2015-08-10 14:06:11 +02:00
parent ef5d394b84
commit 9267fe367e

View File

@ -410,6 +410,7 @@ class DoliDBPgsql extends DoliDB
$this->database_name = $name;
pg_set_error_verbosity($this->db, PGSQL_ERRORS_VERBOSE); // Set verbosity to max
}
pg_query($this->db, "set datestyle = 'ISO, YMD';");
return $this->db;
}