Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sqlplus from PC gives different time than from server

Status
Not open for further replies.

billy1

Technical User
Sep 16, 2002
73
IE
If I do a SQLPLUS connection using SQL Worksheet from my PC and connect to a certain database and run

select to_char(sysdate, 'hh:mi.ss AM') from dual;

I get a different time than if I log onto the unix server, which houses the database, and run a sqlplus connection to the database running the same command.
The time on the SQL worksheet connection is 6 hours behind that of the one on the server connection. (The server connection being the correct time)
Also the time on my PC is the correct time so the problem must be related to the worksheet program itself....

Hope thats clear, any ideas whats going on ?
 
Hi. Timezone settings may be different on the server and your clients. The timezone is sessiondependant and used to calculate the displayed value from sysdate.
A way to check this is the following statement:
Code:
select dbtimezone,sessiontimezone from dual;
If this statement (especially the second value) differs when run on server and client you found the reason for those different values.

Stefan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top