title: java.sql.Time getTime does not return good value
body: <p>In my program I need to read a Time value from the database and then convert that value to milliseconds.
  I do it like this :</p>
  
  <pre><code>Time t = getTimeFromDatabase();
  long millis = t.getTime();
  </code></pre>
  
  <p>The problem is that the value of <code>millis</code> corresponds to time value which is 1 hour earlier than what is entered in the database.</p>
  
  <p>For example: let's say that the value in the DB is 09:30:00. So if I do this:</p>
  
  <pre><code>Time t = getTimeFromDatabase();    
  System.out.println(t.toString);
  System.out.println(t.getTime);
  </code></pre>
  
  <p>Output would be: </p>
  
  <pre><code>09:30:00
  30600000
  </code></pre>
  
  <p>Now... 09:30:00 is ok. That's how it is in the DB.</p>
  
  <p>But <code>30600000 / 3600000 = 8.5</code> (3600000 is milliseconds per hour). Which means that this value in milliseconds corresponds to 08:30:00.</p>
  
  <p>The correct value for 09:30:00 should be 34200000.</p>
  
  <p>My question is how can I get correct value regardless of time zone (I am in UTC +1, so I guess that this has something to do with my problem).</p>
  
  <p>I have tried with other time values but it is always the same (1 hour earlier).</p>
  
  <p>Thanks in advance.</p>