Re: set timestamp oddness

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Will Trillich <will(at)serensoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: set timestamp oddness
Date: 2004-04-06 04:50:30
Message-ID: 19235.1081227030@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Will Trillich <will(at)serensoft(dot)com> writes:
> db=# set timezone = '-6';
> SET
> db=# show timezone;
> TimeZone
> ----------------
> -00:00:00.0216
> (1 row)

hmm ... I get something reasonable here:

regression=# set timezone = '-6';
SET
regression=# show timezone;
TimeZone
-----------
-06:00:00
(1 row)

Could you poke into this more and find out why it goes wrong on your
platform?

> db=# set timezone to '-5:00';
> ERROR: unrecognized time zone name: "-5:00"

That one works for me too...

> the one that "set time zone" does NOT accept, "at time zone" DOES.
> hmm?

This is not totally surprising, seeing that they go through completely
different code paths. I believe "set time zone" accepts whatever the
underlying OS's tzset() routine will take, whereas "at time zone"
only accepts timezone names listed in datetime.c's builtin table.
The difference could and someday should be eliminated, but it will
take rewriting a lot of OS-level timezone support for ourselves :-(

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-06 05:07:25 Re: bug in 7.4.2, with Handling of Double Quotation Marks
Previous Message Marc G. Fournier 2004-04-06 04:14:27 ignore