Project

General

Profile

Redmine 0.8.0 - PostgreSQL 8.1 - datestyle

Added by PM A almost 16 years ago

Hello,

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 ?
Thanks.


Replies (2)

RE: Redmine 0.8.0 - PostgreSQL 8.1 - datestyle - Added by Jean-Baptiste Barth almost 16 years ago

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 almost 16 years ago

I didn't know that it could be done by altering a database.

Thanks a lot for the tip, it works perfectly.

    (1-2/2)