Skip to content

Commit

Permalink
add test for the newly enabled functionality, using a strftime overlo…
Browse files Browse the repository at this point in the history
…ad added by ICU
  • Loading branch information
Tishj committed Apr 16, 2024
1 parent 6c643f7 commit 1b1d7f6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/sql/copy/csv/test_csv_timestamp_tz.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ query II
select * from read_csv_auto('__TEST_DIR__/timestamps.csv');
----
Tuesday Tuesday

24 changes: 24 additions & 0 deletions test/sql/copy/csv/test_csv_timestamp_tz_icu.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# name: test/sql/copy/csv/test_csv_timestamp_tz_icu.test
# description: Test CSV with timestamp_tz and timestampformat
# group: [csv]

statement ok
pragma enable_verification

require icu

statement ok
SET Calendar = 'gregorian';

statement ok
SET TimeZone = 'America/Los_Angeles';

statement ok
COPY (
SELECT make_timestamptz(1713193669561000) AS t
) TO '__TEST_DIR__/timestamp-format.csv' (FORMAT CSV, timestampformat '%x %X.%g%z');

query I
select * from read_csv('__TEST_DIR__/timestamp-format.csv', all_varchar=true)
----
2024-04-15 08:07:49.561-07

0 comments on commit 1b1d7f6

Please sign in to comment.