Jark Wu created FLINK-22349:
-------------------------------
Summary: LOCALTIMESTAMP doesn't return correct result when setting session time zone to 'UTC-09:00'
Key: FLINK-22349
URL:
https://issues.apache.org/jira/browse/FLINK-22349 Project: Flink
Issue Type: Bug
Components: Table SQL / API
Reporter: Jark Wu
Assignee: Leonard Xu
Fix For: 1.13.0, 1.14.0
{code:sql}
set execution.runtime-mode = batch;
set sql-client.execution.result-mode = tableau;
set table.local-time-zone = 'UTC-10:00';
select
LOCALTIME,
CURRENT_DATE,
LOCALTIMESTAMP,
CURRENT_TIME,
CURRENT_TIMESTAMP,
NOW(),
CURRENT_ROW_TIMESTAMP(),
PROCTIME()
from (values (1), (2), (3), (4), (5)) as T(a);
+--------------+--------------+-------------------------+--------------+-------------------------+-------------------------+-------------------------+-------------------------+
| LOCALTIME | CURRENT_DATE | LOCALTIMESTAMP | CURRENT_TIME | CURRENT_TIMESTAMP | EXPR$5 | EXPR$6 | EXPR$7 |
+--------------+--------------+-------------------------+--------------+-------------------------+-------------------------+-------------------------+-------------------------+
| 09:00:58.905 | 2021-04-19 | 2021-04-19 09:00:58.905 | 09:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:59.033 | 2021-04-18 23:00:59.033 |
| 09:00:58.905 | 2021-04-19 | 2021-04-19 09:00:58.905 | 09:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:59.033 | 2021-04-18 23:00:59.033 |
| 09:00:58.905 | 2021-04-19 | 2021-04-19 09:00:58.905 | 09:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:59.033 | 2021-04-18 23:00:59.033 |
| 09:00:58.905 | 2021-04-19 | 2021-04-19 09:00:58.905 | 09:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:59.033 | 2021-04-18 23:00:59.033 |
| 09:00:58.905 | 2021-04-19 | 2021-04-19 09:00:58.905 | 09:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:58.905 | 2021-04-18 23:00:59.033 | 2021-04-18 23:00:59.033 |
+--------------+--------------+-------------------------+--------------+-------------------------+-------------------------+-------------------------+-------------------------+
5 rows in set
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)