Set TimeZone of Flink Streaming job

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Set TimeZone of Flink Streaming job

narasimha
Hi,

How to configure flink job to follow a certain TimeZone, instead of default/UTC.
Is it possible in the first place?

Solutions present are for Table/SQL API. 

--
A.Narasimha Swamy
Reply | Threaded
Open this post in threaded view
|

Re: Set TimeZone of Flink Streaming job

Timo Walther
Hi,

Flink does not support time zones currently. However, all time
operations work on Java `long` values. It can be up to the user what
this long value represents. It must not be UTC but can also be adjusted
for another time zone. Since DataStream API supports arbirary Java
objects, users can convert the long value to LocalDataTime or even
OffsetDateTime if necessary. Windows are always align to the beginning
where the long value equals 0.

Regards,
Timo


On 16.12.20 15:48, narasimha wrote:

> Hi,
>
> How to configure flink job to follow a certain TimeZone, instead of
> default/UTC.
> Is it possible in the first place?
>
> Solutions present are for Table/SQL API.
>
> --
> A.Narasimha Swamy