Fluder-Paradyne commented on PR #4181:
URL: https://github.com/apache/flink-cdc/pull/4181#issuecomment-3709015720

   Hey Guys I am bit confused, 
   I am not sure if server-time-zone affects TIMESTAMPTZ.
   
   This is my current understanding on how TIMESTAMPTZ is treated.
   
   TIMESTAMPTZ -->       DEBEZIUM
   stored as UTC  --> converts to UTC string  
   
   Since debezium also give only a UTC converted string, I dont think there is 
a way to retain timezone information to the sink other than UTC
   
   
https://github.com/debezium/debezium/blob/c88a467e91a7acd0dd535c076a337439e23147ed/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java#L854-L859
   
    https://www.postgresql.org/docs/14/datatype-datetime.html
   > "For timestamp with time zone values, an input string that includes an 
explicit time zone will be converted to UTC ([Universal Coordinated 
Time](https://www.postgresql.org/docs/current/glossary.html#GLOSSARY-UTC)) 
using the appropriate offset for that time zone. If no time zone is stated in 
the input string, then it is assumed to be in the time zone indicated by the 
system's 
[TimeZone](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-TIMEZONE)
 parameter, and is converted to UTC using the offset for the timezone zone. In 
either case, the value is stored internally as UTC, and the originally stated 
or assumed time zone is not retained.
   
   > When a timestamp with time zone value is output, it is always converted 
from UTC to the current timezone zone, and displayed as local time in that 
zone. To see the time in another time zone, either change timezone or use the 
AT TIME ZONE construct (see [Section 
9.9.4](https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT))."
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to