I am confused about how the driver interprets (if at all it does) timezones to and from the database. When I run the following queries directly on the database, these are the results I receive:
The above are the values I would expect as well. However, when I run the same two queries (immediately after) from Java (via the JDBC driver), these are the results:
As you can see, the first query yields the *expected* results. However, the second result seems to have seen some timezone conversion from GMT to Central Time somewhere. I would assume that clock_timestamp() used inside a function, or outside a function should show similar results. Replacing clock_timestamp() with current_timestamp gives the same results. Am I missing something here?