Thread: Timezone strangeness

Timezone strangeness

From
Rod Taylor
Date:
Note the first timezone change is taken, but the second one is ignored.

rbt=# select * from t;         col
------------------------2003-06-03 14:30:25-04
(1 row)
rbt=# set time zone udt;
SET
rbt=# select * from t;         col
------------------------2003-06-03 18:30:25+00
(1 row)
rbt=# set time zone est;
SET
rbt=# select * from t;         col
------------------------2003-06-03 18:30:25+00
(1 row)

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Re: Timezone strangeness

From
Tom Lane
Date:
Rod Taylor <rbt@rbt.ca> writes:
> Note the first timezone change is taken, but the second one is ignored.

Neither of them are being taken, I think.  In CVS tip I getERROR:  unrecognized timezone name "udt"ERROR:  unrecognized
timezonename "est"
 
but until recently we made no attempt to determine whether tzset()
recognized the string or not.  If it didn't, you got UTC.
        regards, tom lane


Re: Timezone strangeness

From
Rod Taylor
Date:
On Wed, 2003-06-04 at 14:55, Christopher Browne wrote:
> Rod Taylor wrote:
> > Note the first timezone change is taken, but the second one is ignored.
> > rbt=3D# set time zone est;
> > SET
> > rbt=3D# select * from t;
> >           col
> > ------------------------
> >  2003-06-03 18:30:25+00
> > (1 row)
>
> Are you certain "est" is a legitimate time zone?

I didn't think to look to see if it was valid as there wasn't an error
reported (so I had mistakenly assumed it was).

Anyway, right you are.. The full zone name is required to function as
expected.  To function in an unexpected fashion, anything is accepted :)

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc