Skip to content

Commit ce4940d

Browse files
chore: add test to show current behavior of string to timezone vs. timestamp to timezone (#11056)
1 parent 30a6ed5 commit ce4940d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

datafusion/sqllogictest/test_files/timestamps.slt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2774,6 +2774,26 @@ SELECT '2000-12-01 04:04:12' AT TIME ZONE 'America/New_York';
27742774
----
27752775
2000-12-01T04:04:12-05:00
27762776

2777+
query P
2778+
SELECT '2024-03-30 00:00:20' AT TIME ZONE 'Europe/Brussels';
2779+
----
2780+
2024-03-30T00:00:20+01:00
2781+
2782+
query P
2783+
SELECT '2024-03-30 00:00:20'::timestamp AT TIME ZONE 'Europe/Brussels';
2784+
----
2785+
2024-03-30T00:00:20+01:00
2786+
2787+
query P
2788+
SELECT '2024-03-30 00:00:20Z' AT TIME ZONE 'Europe/Brussels';
2789+
----
2790+
2024-03-30T01:00:20+01:00
2791+
2792+
query P
2793+
SELECT '2024-03-30 00:00:20Z'::timestamp AT TIME ZONE 'Europe/Brussels';
2794+
----
2795+
2024-03-30T00:00:20+01:00
2796+
27772797
## date-time strings that already have a explicit timezone can be used with AT TIME ZONE
27782798

27792799
# same time zone as provided date-time

0 commit comments

Comments
 (0)