Skip to content

Commit

Permalink
chore: add test to show current behavior of string to timezone vs. ti…
Browse files Browse the repository at this point in the history
…mestamp to timezone (apache#11056)
  • Loading branch information
appletreeisyellow authored and xinlifoobar committed Jun 22, 2024
1 parent d95681a commit 1c4582b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions datafusion/sqllogictest/test_files/timestamps.slt
Original file line number Diff line number Diff line change
Expand Up @@ -2774,6 +2774,26 @@ SELECT '2000-12-01 04:04:12' AT TIME ZONE 'America/New_York';
----
2000-12-01T04:04:12-05:00

query P
SELECT '2024-03-30 00:00:20' AT TIME ZONE 'Europe/Brussels';
----
2024-03-30T00:00:20+01:00

query P
SELECT '2024-03-30 00:00:20'::timestamp AT TIME ZONE 'Europe/Brussels';
----
2024-03-30T00:00:20+01:00

query P
SELECT '2024-03-30 00:00:20Z' AT TIME ZONE 'Europe/Brussels';
----
2024-03-30T01:00:20+01:00

query P
SELECT '2024-03-30 00:00:20Z'::timestamp AT TIME ZONE 'Europe/Brussels';
----
2024-03-30T00:00:20+01:00

## date-time strings that already have a explicit timezone can be used with AT TIME ZONE

# same time zone as provided date-time
Expand Down

0 comments on commit 1c4582b

Please sign in to comment.