Re: [HACKERS] Problem with copying abstimes - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Problem with copying abstimes
Date
Msg-id 0ac673c33108cdf3e2a965b517c29b52
Whole thread Raw
In response to [HACKERS] Problem with copying abstimes  (Ronald Baljeu <rjb@xs4all.nl>)
List pgsql-hackers
Ross Johnson wrote:
> The only true representation for timezones is as an offset from UTC, as
> used in email headers these days, at least those generated by sendmail.
> The problem is that people are more familiar with acronyms even though
> offsets are probably easier to use and to remember.
> I see at least three problems with acronyms:-
> 1) they aren't standard internationally,
> 2) they aren't very informative when seen outside of the zone, country or
> continent they apply to. (I could only guess at most of the zone strings
> used in my own country.)

Well, Australia _does_ seem to have a lot of them :)

> 3) different acronyms are used for the same zone offset as you travel
> north-south around the globe.
> As PostgreSQL is used all over the Internet, would it be too radical to
> suggest that PostgreSQL drop acronyms in favour of offsets as the default
> when displaying or parsing timezones, and especially when copying in and
> out?

Good point! Try "set DateStyle to 'ISO,'" and let me know how you like
it (include the trailing comma until the jumbo-patch comes out in a
couple of weeks). If you want to have a different default for your
installation, look in src/backend/utils/init/globals.c and change
USE_POSTGRES_DATES to USE_ISO_DATES. This output option works for
"datetime" but not for "abstime"; I may be allowed to include the new
output formatter for abstime in the jumbo patch or we may need to wait
for v6.2. btw, the input parser for both datetime and abstime already
understands ISO formats, so you can specify that style for input.

Perhaps we could reach a consensus (or take a vote) on the preferred
default time format for v6.2; Y2000 troubles may change a lot of
people's preferences for time formats and ISO-8601 (which the Postgres
ISO date format should be compatible with) is supposed to help...

            - Tom

------------------------------

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] \dt and disk access
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] \dt and disk access