Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: timezone
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
![]() |
![]() |