Redmine 0.8.0 - PostgreSQL 8.1 - datestyle
We're using PostgreSQL for years now for our internal apps.
An old (and bad) choice has been done on our pgsql cluster about the datestyle: SQL,European.
Obviously, it does not allow Redmine to work right. For example today, February, the 8th, is displayed in Redmine as August, the 2nd.
The datestyle ISO,MDY, which is the default in a pgsql installation, works well.
As I can't change the datestyle parameter directly in our cluster configuration, I was wondering how and where I can change that runtime parameter in Redmine or Rails.
I need to add:
SET datestyle ISO,MDY;
before each requests, or
SET SESSION datestyle ISO,MDY;
before each sessions.
Is there any way to do it ?
I don't think you need it before each request. To change this param just for one base you can do this :
ALTER DATABASE "yourDB" SET datestyle="ISO,MDY";
RE: Redmine 0.8.0 - PostgreSQL 8.1 - datestyle - Added by PM A over 11 years ago
I didn't know that it could be done by altering a database.
Thanks a lot for the tip, it works perfectly.