Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Timezones Help Required..Pls
In 8i, you can consider using the NEW_TIME function: select
new_time(timecolumn,'Z1','Z2') from yourtable. Z1 is the timezone
where the database is and Z2 is where the user is. This means you have
to rewrite your code, ad hoc or not. Not very convenient.
Setting TZ environment variable only affects the time returned by SYSDATE in a local database connection, i.e. not through Oracle Net. So it doesn't help you.
Yong Huang
mtproc_at_yahoo.co.uk (Roy Munson) wrote in message news:<853055e7.0411300332.6713d1aa_at_posting.google.com>...
> Hi,
>
> Currently running 8.1.7.4 but looking at upgrading to 9.x or 10g. Is
> there something which could be set in a profile to set the users
> timezone on connection to SQL Plus?
>
> Thanks
>
> "Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:<41ab685a$0$9113$afc38c87_at_news.optusnet.com.au>...
> > Roy Munson wrote:
> > > Hi,
> > >
> > > Have clients who may be based in different timzones to the database
> > > server. The clients need to do their own ad-hoc SQL queries. Is it
> > > possible to set the clients timezone when they connect via a SQL Plus
> > > session so that times retrieved are shown not as stored but as their
> > > timezone?
> > >
> > > Really need help ASAP on this if possible.
> > >
> > > Regards
> >
> > An Oracle version would help. If it is 9i or better, then the TIMESTAMP
> > WITH LOCAL TIME ZONE data type will do what I think you are after.
> >
> > Regards
> > HJR
Received on Wed Dec 01 2004 - 08:42:52 CST
![]() |
![]() |