Re: store SET time_zone as part of a VIEW statement
Posted by: Peter Brawley
Date: April 08, 2012 01:18PM

> If you are on the same machine, the SELECT comes back with exactly what you put in.

Actually if you change the timezone, the retrieved timestamp changes accordingly since it's defined relative to the session time zone:

drop table if exists t;
create table t(t timestamp default now());
insert into t values(null);
select * from t;
+---------------------+
| t                   |
+---------------------+
| 2012-04-08 14:09:19 |
+---------------------+
set session time_zone='+5:00';
select * from t;
+---------------------+
| t                   |
+---------------------+
| 2012-04-09 00:09:19 |
+---------------------+

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: store SET time_zone as part of a VIEW statement
April 08, 2012 01:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.