Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: timezone

Re: timezone

From: Mike Morgan <mmorga2_at_amfam.com>
Date: 1997/08/21
Message-ID: <01bcae3f$281838e0$7c38c8a5@mxm014pc>#1/1

David,

If this is unix you can set a variable:

TZ=`date +"%Z"`

Then you can use ${TZ} in sqlplus :

sqlplus -s user/password <<EOF
SELECT TO_CHAR(NEW_TIME(sysdate,'${TZ}','GMT'),'HH24:MI:SS') FROM DUAL; EOF HTH
Mike Morgan

David Coper <cooper_at_frasier.nosc.mil> wrote in article <33FB80CB.13D1_at_frasier.nosc.mil>...
| I need to convert a SYSDATE call to GMT/UTC from the local timezone.
|
| I know that I can convert it using NEW_TIME but that assumes that
| I know in advance the local timezone of the systems which will
| run the applications which I don't.
|
| Is there a way to determine the local timezone at runtime?
|
| Thanks.
|
  Received on Thu Aug 21 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US