mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user