From b88f67ed124908ccccd900d359657b6b23c80367 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 22 Mar 2021 21:46:22 +0300 Subject: [PATCH 1/2] Add a test for #21991 --- tests/queries/0_stateless/01765_tehran_dst.reference | 1 + tests/queries/0_stateless/01765_tehran_dst.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 tests/queries/0_stateless/01765_tehran_dst.reference create mode 100644 tests/queries/0_stateless/01765_tehran_dst.sql diff --git a/tests/queries/0_stateless/01765_tehran_dst.reference b/tests/queries/0_stateless/01765_tehran_dst.reference new file mode 100644 index 00000000000..8b0a23c7971 --- /dev/null +++ b/tests/queries/0_stateless/01765_tehran_dst.reference @@ -0,0 +1 @@ +2021-03-22 23:15:11 diff --git a/tests/queries/0_stateless/01765_tehran_dst.sql b/tests/queries/0_stateless/01765_tehran_dst.sql new file mode 100644 index 00000000000..b332ba457a1 --- /dev/null +++ b/tests/queries/0_stateless/01765_tehran_dst.sql @@ -0,0 +1 @@ +SELECT toTimeZone(toDateTime('2021-03-22 18:45:11', 'UTC'), 'Asia/Tehran'); From 5d8b74e02ec72e8d2223432f4746dffab367207d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 22 Mar 2021 21:49:12 +0300 Subject: [PATCH 2/2] Also fix #13845 --- tests/queries/0_stateless/01765_tehran_dst.reference | 1 + tests/queries/0_stateless/01765_tehran_dst.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/queries/0_stateless/01765_tehran_dst.reference b/tests/queries/0_stateless/01765_tehran_dst.reference index 8b0a23c7971..61f5403e5e5 100644 --- a/tests/queries/0_stateless/01765_tehran_dst.reference +++ b/tests/queries/0_stateless/01765_tehran_dst.reference @@ -1 +1,2 @@ 2021-03-22 23:15:11 +2020-03-21 23:00:00 diff --git a/tests/queries/0_stateless/01765_tehran_dst.sql b/tests/queries/0_stateless/01765_tehran_dst.sql index b332ba457a1..41b92ae2360 100644 --- a/tests/queries/0_stateless/01765_tehran_dst.sql +++ b/tests/queries/0_stateless/01765_tehran_dst.sql @@ -1 +1,2 @@ SELECT toTimeZone(toDateTime('2021-03-22 18:45:11', 'UTC'), 'Asia/Tehran'); +SELECT toDateTime('2020-03-21 23:00:00', 'Asia/Tehran');