Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sysdate different from DB date in SQL Developer

1031795Aug 9 2013 — edited Aug 20 2013

I am using SQL developer as a client for an Oracle 11g RAC. Database server is set to Pacific Daylight Timezone (PDT) and when I query the sysdate in sqlplus always shows the PDT time. But from sql developer it display GMT -4 datetime.

The system date on the system where sql develope is running is also set to PDT, even if I changed from Central timezone. I tried to add this parameter to sqldeveloper configuration files:

AddVMOption -Duser.timezone=GMT-7

But I continue to see these results:

From SQL DEVELOPER:

select to_char(current_date,'DD-MON-YY HH:MI:SS'), to_char(sysdate,'DD-MON-YY HH:MI:SS'), sessiontimezone from dual;

CURRENT_DATE SYSDATE SESSIONTIMEZONE
09-AUG-13 12:57:11 10-AUG-13 03:57:11 -07:00

From SQL plus:

SQL> select to_char(current_date,'DD-MON-YY HH:MI:SS'), to_char(sysdate,'DD-MON-YY HH:MI:SS'), sessiontimezone from dual;

TO_CHAR(CURRENT_DATE,'DD-MO TO_CHAR(SYSDATE,'DD-MON-YYH
--------------------------- ---------------------------
SESSIONTIMEZONE
---------------------------------------------------------------------------
09-AUG-13 12:55:11 09-AUG-13 12:55:11
-07:00

Anyone knows how to have the same output as it is in SQL PLUS?

I have to schedule jobs in a production environment and I guess it is better to use sysdate instead of current_date.

Thanks for your help.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2013
Added on Aug 9 2013
5 comments
4,435 views