2 Replies Latest reply: Mar 19, 2014 11:17 AM by chuckers RSS

    SQL Dev 4.0.0.13 Timezone for SQL Developer wrong for DATE

    chuckers

      If we attempt to change a DATE or TIMESTAMP within a data grid, and use the DatePicker, the Now button gives us an value exactly 8 hours in the future. I found something online about adding the following within sqldeveloper.conf: to try & rectify:

       

           AddVMOption -Duser.timezone=PST

       

      That doesn't seem to work.

       

      Oddly, if you attempt to do the same datatype change for a column of type TIMESTAMP WITH TIMEZONE or TIMESTAMP WITH LOCAL TIMEZONE, then the value returned is correct to the hour. This was true before & after the sqldeveloper.conf change.

       

      --=Chuck

       

      Not sure if

        • 1. Re: SQL Dev 4.0.0.13 Timezone for SQL Developer wrong for DATE
          rp0428

          That doesn't seem to work.

          sql developer NEVER displays any message saying "doesn't seem to work".

           

          You need to SHOW us what you are actually doing and what results you are getting.

          AddVMOption -Duser.timezone=PST

          Are you saying you tried over 40 different timezone settings and none of them had any effect at all?

          Oddly, if you attempt to do the same datatype change for a column of type TIMESTAMP WITH TIMEZONE or TIMESTAMP WITH LOCAL TIMEZONE, then the value returned is correct to the hour.

          Well doesn't that make sense to you? Those datatypes INCLUDE the timezone to use.

           

          If you don't include the timezone take a guess as to what timezone sql developer is going to use. Does your client or server timezone match that 8 hours you said you are getting?

           

          • 2. Re: SQL Dev 4.0.0.13 Timezone for SQL Developer wrong for DATE
            chuckers

            I'm not quite sure that you read my post thoroughly. I tried changing the sqldeveloper.conf file to recognize my local timezone, without seeing the results I was expecting. Have you tried double-clicking in a date column for a table in a data grid, and clicking on the button with the pencil that appears at the righter-most position of that particular cell? If you haven't, it causes an "Edit Value" dialog to pop-up which allows you to select a date via a GUI, or you can click the "Now" button to get the current datetime. It's that "Now" button which isn't behaving, and is showing a time 8 hours in the future.

             

            "Doesn't seem to work" should be rephrased as "Has absolutely no effect on the "Edit Value" pop-up's pre-selection of a time exactly 8 hours in the future." There was no message the first time, and there was no message after the sqldeveloper.conf change. I also can't really *show* you anything, since this all occurs within a pop-up control within SQL Developer (and the image addition function in this forum isn't working), so, you'll just have to take my word for it.

             

            I tried 2 distinct timezones, and I also tried enclosing them in double-quotes:

             

                 AddVMOption -Duser.timezone="PST"

             

            which was something I'd seen in a suggestion elsewhere, with no effect. So I guess I tried 38 fewer timezones than 40, of the 372 distinct combinations listed in V$TIMEZONE_NAMES.

             

            We have SQL Developer installed in Citrix, and I've verified that the Citrix server has the correct date and time.

             

            I think you're a bit off the mark on your timezone statement, at least in this regard:

             

                 "Well doesn't that make sense to you? Those datatypes INCLUDE the timezone to      use."

             

            In this case, I have no date sitting in a column in a database table. I have an "Edit Value" pop-up asking for input, and I'm clicking the "Now" button. So the tool is using some method for picking the current data and time, which is correct when the eventual target for the data is a column with TIMEZONE, but not when the column is a DATE or TIMESTAMP alone.

             

            --=Chuck