Bug 18964

Summary: Date Format changed
Product: [Retired] Red Hat Linux Reporter: James Pattie <james>
Component: postgresqlAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED NOTABUG QA Contact: Dale Lovelace <dale>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-12 15:12:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Pattie 2000-10-12 15:12:03 UTC
The Date format changed from PostgreSQL 6.5.2 to 7.0+.

Here is the solution we have found to make it act like before for those
people who are expecting the date to come out as 10-10-2000 and not
2000-10-10.

There are 2 options:

1) session only: issue the "SET datestyle TO 'POSTGRES,US';" from inside
your program.

2) system wide setting:  in /etc/profile add

export PGDATESTYLE='POSTGRES,US'

then restart postgresql and the backend will default to the US datestyle. 
Any sessions started via psql, etc. will use the US datestyle until you
issue a SET datestyle command to change it to something else.

Hope this helps anyone who has been bit by this.

Comment 1 Trond Eivind Glomsrxd 2000-10-17 15:51:51 UTC
Using the proper date format (ISO or European) is not a bug - the US way is just
weird.