Re: table.local-time-zone not working

2022-05-10 Thread Leonard Xu
I guess the ‘values’ you means is the underlying instant value fo TIMESTAMP_LTZ 
datatype, they are the epoch times which are same in different timezones, 
that’s the epoch semantics.  The session timezone does not affect the 
underlying value, it only affects the display string in a session, you can try 
this in the SQL Client refer [1]

Best,
Leonard
[1]  
https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/timezone/


> 2022年5月10日 下午4:13,Surendra Lalwani  写道:
> 
> I have also tried to set it in flink-conf.yaml, it is visible in Job Manager 
> Configurations but still NOW() and PROCTIME() are returning values in UTC.
> 
> Thanks and Regards ,
> Surendra Lalwani
> 
> 
> On Tue, May 10, 2022 at 1:09 PM Surendra Lalwani  > wrote:
> Hi Leonard,
> 
> Flink Version is 1.13.6 and I am adding property as follows:
> 
> Configuration tconf = tenv.getConfig().getConfiguration();
>   tconf.setString("table.local-time-zone", "America/Los_Angeles");
>   
> tenv.getConfig().setLocalTimeZone(ZoneId.of("America/Los_Angeles"));
> 
> Thanks and Regards ,
> Surendra Lalwani
> 
> 
> On Tue, May 10, 2022 at 1:07 PM Leonard Xu  > wrote:
> Hi, Lalwani
> 
> Could you share how you set this property and your Flink version?
> 
> Best,
> Leonard
> 
> 
>> 2022年5月10日 下午3:01,Surendra Lalwani > > 写道:
>> 
>> Hi Team,
>> 
>> I have tried using this property 
>> table.local-time-zone
>> 
>> But it seems like it is not making any impact, on calling functions like 
>> PROCTIME() and NOW(), it always returns UTC value. Any help would be 
>> appreciated.
>> 
>> Thanks and Regards ,
>> Surendra Lalwani
>> 
>> 
>> IMPORTANT NOTICE: This e-mail, including any attachments, may contain 
>> confidential information and is intended only for the addressee(s) named 
>> above. If you are not the intended recipient(s), you should not disseminate, 
>> distribute, or copy this e-mail. Please notify the sender by reply e-mail 
>> immediately if you have received this e-mail in error and permanently delete 
>> all copies of the original message from your system. E-mail transmission 
>> cannot be guaranteed to be secure as it could be intercepted, corrupted, 
>> lost, destroyed, arrive late or incomplete, or contain viruses. Company 
>> accepts no liability for any damage or loss of confidential information 
>> caused by this email or due to any virus transmitted by this email or 
>> otherwise.
> 
> 
> 
> IMPORTANT NOTICE: This e-mail, including any attachments, may contain 
> confidential information and is intended only for the addressee(s) named 
> above. If you are not the intended recipient(s), you should not disseminate, 
> distribute, or copy this e-mail. Please notify the sender by reply e-mail 
> immediately if you have received this e-mail in error and permanently delete 
> all copies of the original message from your system. E-mail transmission 
> cannot be guaranteed to be secure as it could be intercepted, corrupted, 
> lost, destroyed, arrive late or incomplete, or contain viruses. Company 
> accepts no liability for any damage or loss of confidential information 
> caused by this email or due to any virus transmitted by this email or 
> otherwise.



Re: table.local-time-zone not working

2022-05-10 Thread Surendra Lalwani
I have also tried to set it in flink-conf.yaml, it is visible in Job
Manager Configurations but still NOW() and PROCTIME() are returning values
in UTC.

Thanks and Regards ,
Surendra Lalwani


On Tue, May 10, 2022 at 1:09 PM Surendra Lalwani 
wrote:

> Hi Leonard,
>
> Flink Version is 1.13.6 and I am adding property as follows:
>
> Configuration tconf = tenv.getConfig().getConfiguration();
>
> tconf.setString("table.local-time-zone", "America/Los_Angeles");
>
> tenv.getConfig().setLocalTimeZone(ZoneId.*of*("America/Los_Angeles"));
>
> Thanks and Regards ,
> Surendra Lalwani
>
>
> On Tue, May 10, 2022 at 1:07 PM Leonard Xu  wrote:
>
>> Hi, Lalwani
>>
>> Could you share how you set this property and your Flink version?
>>
>> Best,
>> Leonard
>>
>>
>> 2022年5月10日 下午3:01,Surendra Lalwani  写道:
>>
>> Hi Team,
>>
>> I have tried using this property
>> table.local-time-zone
>> But it seems like it is not making any impact, on calling functions like
>> PROCTIME() and NOW(), it always returns UTC value. Any help would be
>> appreciated.
>>
>> Thanks and Regards ,
>> Surendra Lalwani
>>
>>
>> --
>> IMPORTANT NOTICE: This e-mail, including any attachments, may contain
>> confidential information and is intended only for the addressee(s) named
>> above. If you are not the intended recipient(s), you should not
>> disseminate, distribute, or copy this e-mail. Please notify the sender by
>> reply e-mail immediately if you have received this e-mail in error and
>> permanently delete all copies of the original message from your system.
>> E-mail transmission cannot be guaranteed to be secure as it could be
>> intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
>> contain viruses. Company accepts no liability for any damage or loss of
>> confidential information caused by this email or due to any virus
>> transmitted by this email or otherwise.
>>
>>
>>

-- 

IMPORTANT NOTICE: This e-mail, including any attachments, may contain 
confidential information and is intended only for the addressee(s) named 
above. If you are not the intended recipient(s), you should not 
disseminate, distribute, or copy this e-mail. Please notify the sender by 
reply e-mail immediately if you have received this e-mail in error and 
permanently delete all copies of the original message from your system. 
E-mail transmission cannot be guaranteed to be secure as it could be 
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or 
contain viruses. Company accepts no liability for any damage or loss of 
confidential information caused by this email or due to any virus 
transmitted by this email or otherwise.


Re: table.local-time-zone not working

2022-05-10 Thread Surendra Lalwani
Hi Leonard,

Flink Version is 1.13.6 and I am adding property as follows:

Configuration tconf = tenv.getConfig().getConfiguration();

tconf.setString("table.local-time-zone", "America/Los_Angeles");

tenv.getConfig().setLocalTimeZone(ZoneId.*of*("America/Los_Angeles"));

Thanks and Regards ,
Surendra Lalwani


On Tue, May 10, 2022 at 1:07 PM Leonard Xu  wrote:

> Hi, Lalwani
>
> Could you share how you set this property and your Flink version?
>
> Best,
> Leonard
>
>
> 2022年5月10日 下午3:01,Surendra Lalwani  写道:
>
> Hi Team,
>
> I have tried using this property
> table.local-time-zone
> But it seems like it is not making any impact, on calling functions like
> PROCTIME() and NOW(), it always returns UTC value. Any help would be
> appreciated.
>
> Thanks and Regards ,
> Surendra Lalwani
>
>
> --
> IMPORTANT NOTICE: This e-mail, including any attachments, may contain
> confidential information and is intended only for the addressee(s) named
> above. If you are not the intended recipient(s), you should not
> disseminate, distribute, or copy this e-mail. Please notify the sender by
> reply e-mail immediately if you have received this e-mail in error and
> permanently delete all copies of the original message from your system.
> E-mail transmission cannot be guaranteed to be secure as it could be
> intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
> contain viruses. Company accepts no liability for any damage or loss of
> confidential information caused by this email or due to any virus
> transmitted by this email or otherwise.
>
>
>

-- 

IMPORTANT NOTICE: This e-mail, including any attachments, may contain 
confidential information and is intended only for the addressee(s) named 
above. If you are not the intended recipient(s), you should not 
disseminate, distribute, or copy this e-mail. Please notify the sender by 
reply e-mail immediately if you have received this e-mail in error and 
permanently delete all copies of the original message from your system. 
E-mail transmission cannot be guaranteed to be secure as it could be 
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or 
contain viruses. Company accepts no liability for any damage or loss of 
confidential information caused by this email or due to any virus 
transmitted by this email or otherwise.


Re: table.local-time-zone not working

2022-05-10 Thread Leonard Xu
Hi, Lalwani

Could you share how you set this property and your Flink version?

Best,
Leonard


> 2022年5月10日 下午3:01,Surendra Lalwani  写道:
> 
> Hi Team,
> 
> I have tried using this property 
> table.local-time-zone
> 
> But it seems like it is not making any impact, on calling functions like 
> PROCTIME() and NOW(), it always returns UTC value. Any help would be 
> appreciated.
> 
> Thanks and Regards ,
> Surendra Lalwani
> 
> 
> IMPORTANT NOTICE: This e-mail, including any attachments, may contain 
> confidential information and is intended only for the addressee(s) named 
> above. If you are not the intended recipient(s), you should not disseminate, 
> distribute, or copy this e-mail. Please notify the sender by reply e-mail 
> immediately if you have received this e-mail in error and permanently delete 
> all copies of the original message from your system. E-mail transmission 
> cannot be guaranteed to be secure as it could be intercepted, corrupted, 
> lost, destroyed, arrive late or incomplete, or contain viruses. Company 
> accepts no liability for any damage or loss of confidential information 
> caused by this email or due to any virus transmitted by this email or 
> otherwise.