title: Incorrect date fetched from Postgres
body: <p>I have a field called <code>deadline_date</code> of type <code>timestamp with time zone</code> with value  <code>2018-05-03 19:00:00-05.</code></p>
  
  <pre><code>select deadline_date from invoice_details where file_name='BHDHSB.pdf';
  
       deadline_date      
  ------------------------
   2018-05-03 19:00:00-05
  (1 row)
  </code></pre>
  
  <p>But on querying from my java code it is returning the value as <code>2018-05-04 05:30:00+05:30</code> .</p>
  
  <p>I think it is converting the the date according to my local timezone.</p>
  
  <p>Is there any way to get the value as stored in the table?</p>
  
  <p>I am using the following maven dependency for Postgres</p>
  
  <pre><code>&lt;dependency&gt;
       &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
       &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
       &lt;version&gt;9.4.1212&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Test.java</p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.Statement;
  public class Test {
      public static Connection connection;
      public void createConnection()
      {
          try {
              if (connection==null) {
                  Class.forName("org.postgresql.Driver");
                  connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/abc", "abc", "Welcome");
                  connection.setSchema("iiv_location");
              }
          } catch (Exception e) {
              e.printStackTrace();
              System.err.println(e.getClass().getName() + ": " + e.getMessage());
          }
      }
  
     public static void main(String[] args) {
          try {
              test object = new test();
              object.createConnection();
              Statement statement = connection.createStatement();
              ResultSet resultSet = statement.executeQuery("select iiv_prescan_invoice_details.deadline_date from iiv_prescan_invoice_details");
              while (resultSet.next()) {
                  System.out.println(resultSet.getString("deadline_date"));
             }
          } catch (Exception e) {
              e.printStackTrace();
          }
     }
  }
  </code></pre>