Hello, i have a very naive question, my flink job ...
# troubleshooting
n
Hello, i have a very naive question, my flink job giving different value for LOCALTIME and PROCTIME(). proctime() -> 2023-12-20T091625.406Z localtime -> 144625 how can i fix it? proctime is matching with machine time and it is in UTC. Also cast(PROCTIME() as TIMESTAMP(3)) -> 2023-12-20T144625.406 why it is changing the timezone when
TIMESTAMP(p)
is an abbreviation for
TIMESTAMP(p) WITHOUT TIME ZONE
https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/timezone/
j
Have you tried setting the table environment's local-time-zone to UTC?
Copy code
SET 'table.local-time-zone' = 'UTC';
It looks like LOCALTIME and the cast are both using your system's timezone and mapping the UTC timestamp to the local time.
n
but my machine time is in UTC only. From where it is picking the local time zone?
j
Interesting. Not sure. I'd double-check the Java system properties, maybe that is it?