Timezone strangeness

Started by Rod Tayloralmost 23 years ago3 messageshackers
Jump to latest
#1Rod Taylor
rbt@rbt.ca

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rod Taylor (#1)
Re: Timezone strangeness

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 get
ERROR: unrecognized timezone name "udt"
ERROR: unrecognized timezone name "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

#3Rod Taylor
rbt@rbt.ca
In reply to: Rod Taylor (#1)
Re: Timezone strangeness

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