Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What is the current local time zone ?
Martin Terpstra wrote:
>
> hello,
>
> is there a way to determine the local time zone from Oracle (sqlplus,
> Oracle Graphics/Report/Forms) ?
>
> UNIX uses the TZ (time zone) environment variable to indicate the offset
> relative to the GMT time.
> Does Oracle also know this time zone information or does it just take
> the UNIX system time ?
>
> (GMT = Greenwich Mean Time)
>
> --
> Martin Terpstra Alcatel Telecom Nederland
> Software Design Engineer Engineering & Development
> phone : +31 (70) 307-9407 Burgemeester Elsenlaan 170
> fax : +31 (70) 307-9191 2288 BH RIJSWIJK
> mailto:terpstra_at_ats.nld.alcatel.nl NETHERLANDS
In Oracle you have to use a date function called NEW_TIME.
select NEW_TIME(DATE,'TIME ZONE YOU ARE IN', TIME ZONE YOU WANT') FROM
DUAL;
For example if you are in CST and wants time in EST THEN
SELECT NEW_TIME(DATE,'CST',EST') FROM DUAL;
AST Atlantic Standard Time BST Bering Standard Time CST Central Standard Time EST Eastern Standard Time GMT Greenwich time MST Mountain Standard Time HST Alaska-Hawaii Standard Time NST Newfoundland Standard Time PST Pacific Standard Time
Hope This Helps
AMARENDRA
-- ****************************************************************************** AMARENDRA B NETTEM 5039 N E River Road, Apt. 1A Certified Oracle DBA NORRIDGE, IL 60656 Whittman-Hart Inc., 311 South Wacker Drive, Suite 3500 Chicago, IL 60606. Ph.No. (708) 583 9870 (H) (312) 913 6758 (W) E-mail:nettama_at_charlie.cns.iit.edu, anettem_at_whittman-hart.com Homepage: http://www.iit.edu/~nettama **************************************************************************** Opinions are mine and do not necessarily reflect those of Whittman-hart Inc.Received on Tue Oct 14 1997 - 00:00:00 CDT
![]() |
![]() |