<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tPostgreSQLInput Reading UTC timestamp incorrectly in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tPostgreSQLInput-Reading-UTC-timestamp-incorrectly/m-p/2358523#M123532</link>
    <description>&lt;P&gt;this is a huge pain! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and this is not a Talend problem - mostly JDBC do all them self&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;what I do on similar tasks where need convert timestamp without timezone (but UTC):&lt;BR /&gt;1) before open jdbc connection, use tJava for setup JVM timezone UTC&lt;/P&gt; 
&lt;PRE&gt;java.util.TimeZone user_TimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(user_TimeZone);&lt;/PRE&gt; 
&lt;P&gt;2) in tPostgreSQLInput - edit query to show for JDBC - it is already UTC&lt;/P&gt; 
&lt;PRE&gt;"select
	timecolumn AT TIME ZONE 'UTC' // this is not necessary, but I prefer mange it
from table_source
"&lt;/PRE&gt; 
&lt;P&gt;3) in tPostbreSQLOutput component use TIMESTAMPTZ for output column&lt;BR /&gt;&lt;BR /&gt;this is and only this combination allow to have finally:&lt;/P&gt; 
&lt;PRE&gt;vladimir=# select
vladimir-# timecolumn AT TIME ZONE 'UTC' as time_at_utc,
vladimir-# timecolumn time_local
vladimir-# from table_target;
     time_at_utc     |       time_local       
---------------------+------------------------
 2018-03-11 02:15:18 | 2018-03-11 15:15:18+13
(1 row)&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jun 2018 00:22:48 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2018-06-01T00:22:48Z</dc:date>
    <item>
      <title>tPostgreSQLInput Reading UTC timestamp incorrectly</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tPostgreSQLInput-Reading-UTC-timestamp-incorrectly/m-p/2358522#M123531</link>
      <description>&lt;P&gt;I am trying to ETL timestamp values from one PostgreSQL database table to another. The timestamps in the source table are of type "timestamp without timezone" and are in UTC. The problem is that when I try to read values from March 11th, 2018 from 2AM to 3AM, the component tries to "fix" them by shifting them all up one hour, since that time range did not exist in Eastern Daylight Time. But since the original values are UTC, that range did indeed "exist". How do I stop the component from trying to "fix" them and just accept the values as read?&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 19:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tPostgreSQLInput-Reading-UTC-timestamp-incorrectly/m-p/2358522#M123531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-31T19:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: tPostgreSQLInput Reading UTC timestamp incorrectly</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tPostgreSQLInput-Reading-UTC-timestamp-incorrectly/m-p/2358523#M123532</link>
      <description>&lt;P&gt;this is a huge pain! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and this is not a Talend problem - mostly JDBC do all them self&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;what I do on similar tasks where need convert timestamp without timezone (but UTC):&lt;BR /&gt;1) before open jdbc connection, use tJava for setup JVM timezone UTC&lt;/P&gt; 
&lt;PRE&gt;java.util.TimeZone user_TimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(user_TimeZone);&lt;/PRE&gt; 
&lt;P&gt;2) in tPostgreSQLInput - edit query to show for JDBC - it is already UTC&lt;/P&gt; 
&lt;PRE&gt;"select
	timecolumn AT TIME ZONE 'UTC' // this is not necessary, but I prefer mange it
from table_source
"&lt;/PRE&gt; 
&lt;P&gt;3) in tPostbreSQLOutput component use TIMESTAMPTZ for output column&lt;BR /&gt;&lt;BR /&gt;this is and only this combination allow to have finally:&lt;/P&gt; 
&lt;PRE&gt;vladimir=# select
vladimir-# timecolumn AT TIME ZONE 'UTC' as time_at_utc,
vladimir-# timecolumn time_local
vladimir-# from table_target;
     time_at_utc     |       time_local       
---------------------+------------------------
 2018-03-11 02:15:18 | 2018-03-11 15:15:18+13
(1 row)&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 00:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tPostgreSQLInput-Reading-UTC-timestamp-incorrectly/m-p/2358523#M123532</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-06-01T00:22:48Z</dc:date>
    </item>
  </channel>
</rss>

