Bug 18964 - Date Format changed
Date Format changed
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Dale Lovelace
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-12 11:12 EDT by James Pattie
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-12 11:12:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Pattie 2000-10-12 11:12:03 EDT
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 11:51:51 EDT
Using the proper date format (ISO or European) is not a bug - the US way is just
weird.

Note You need to log in before you can comment on or make changes to this bug.