title: Oracle/JDBC: Problem with correct Timezone of rows
body: <p>I have a table TAB with a timestamp (DT) and a value (VAL) per row.</p>
  
  <pre><code> DT           NOT NULL   TIMESTAMP(0) WITH LOCAL TIME ZONE
   VAL          NOT NULL   NUMBER
  </code></pre>
  
  <p>I try to read and get the timestamps in UTC.</p>
  
  <pre><code>SELECT SYS_EXTRACT_UTC (dt) AS dtm, val FROM mytab;
  </code></pre>
  
  <p>Result in Sqlplus looks ok to me.</p>
  
  <pre><code>DTM                 VAL
  ---------------------------
  30.03.19 23:00:00   124
  31.03.19 00:00:00   125
  31.03.19 01:00:00   126
  31.03.19 02:00:00   127
  31.03.19 03:00:00   128
  31.03.19 04:00:00   129
  31.03.19 05:00:00   130
  </code></pre>
  
  <p>Now I do the same in Java/JDBC.</p>
  
  <pre><code>java.sql.Timestamp ts = rs.getTimestamp ("dtm");
  java.util.Date dt = rs.getDate ("dtm"); 
  java.util.Date tm = rs.getTime ("dtm");
  ZonedDateTime zdt = ts.toInstant ().atZone (ZoneOffset.UTC);
  
  System.out.println("ts="+ts.toString() + "     val="+rs.getDouble("wert") +
       "   dt=" + dt.toString() + "    tm=" + tm.toString() +"      zdt="+zdt);
  </code></pre>
  
  <p>And the result is not what I expected regarding timezones.</p>
  
  <pre><code>ts=2019-03-30 23:00:00.0     val=124.0   dt=2019-03-30    tm=23:00:00      zdt=2019-03-30T22:00Z
  ts=2019-03-31 00:00:00.0     val=125.0   dt=2019-03-31    tm=00:00:00      zdt=2019-03-30T23:00Z
  ts=2019-03-31 01:00:00.0     val=126.0   dt=2019-03-31    tm=01:00:00      zdt=2019-03-31T00:00Z
  ts=2019-03-31 03:00:00.0     val=127.0   dt=2019-03-31    tm=02:00:00      zdt=2019-03-31T01:00Z
  ts=2019-03-31 03:00:00.0     val=128.0   dt=2019-03-31    tm=03:00:00      zdt=2019-03-31T01:00Z
  ts=2019-03-31 04:00:00.0     val=129.0   dt=2019-03-31    tm=04:00:00      zdt=2019-03-31T02:00Z
  ts=2019-03-31 05:00:00.0     val=130.0   dt=2019-03-31    tm=05:00:00      zdt=2019-03-31T03:00Z
  </code></pre>
  
  <p>Why does ts have a double 3? I would expect it to be in UTC.
  The only correct time is in tm.</p>
  
  <p>Why is that? Whats the problem here?</p>
  
  <p>JRE 1.8
  Oracle 12c
  Linux with local timezone CET/CEST</p>