| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Incorrect Oracle Sysdate
tvf1413_at_yahoo.com (tvf) wrote in message news:<e86dbafc.0211040750.3b9755c3_at_posting.google.com>...
> We are running an old CRM app (Scopus) and are in the process of
> evaluating a replacement. I recently copied the backend Oracle 7.3.4
> database from Solaris 2.6 to new hardware running Solaris 8. I've
> since noticed that the Oracle sysdate command now returns GMT and this
> is screwing up the timestamps that the app is using. I cannot change
> the code in the app to stop it from using sysdate. Is there a way I
> can update the Oracle sysdate so that it reflects the OS date/time? Is
> setting the init.ora parameter fixed_date the only way to do this?
Be sure the environment variable for the timezone (perhaps TZ) is set properly in the shell that is starting up the server, and is exported/setenv.
Be sure the environment variable for the timezone in your client is set up properly, and all the NLS variables are set on the client are set correctly at the beginning of the session.
Test your TZ variable by going into a subshell and echoing it.
Oracle always uses GMT, and is supposed to display on the client in the local zone. Search metalink for Y2K issues for a more complete understanding.
>
> # uname -a
> SunOS xxx.xxx.com 5.8 Generic_108528-07 sun4u sparc
> SUNW,Ultra-Enterprise
> # date
> Mon Nov 4 09:45:10 CST 2002
>
> --
> Oracle7 Server Release 7.3.4.0.1 - Production
> PL/SQL Release 2.3.4.0.0 - Production
>
> SQL> select to_char(sysdate, 'mm/dd/yyyy hh:miAM') from dual;
> TO_CHAR(SYSDATE,'MM/DD/YYYYHH:MIAM')
> ---------------------------------------------------------------------------
> 11/04/2002 03:45PM
>
> Thank you for your time.
jg
-- @home.com is bogus 30072, 00000, "invalid time zone value" // *Cause: The value specified for the time zone string, which appears in // ALTER SESSION statement, environment variable ORA_SDTZ, or // a datetime factor, is not valid. // *Action:Received on Mon Nov 04 2002 - 16:17:34 CST
![]() |
![]() |