5 Replies Latest reply: Aug 20, 2013 4:27 AM by Dwhittin-Oracle RSS

    Sysdate different from DB date in SQL Developer

    9867a62c-3b44-4469-835b-dfc2f5071cef

      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.