Skip to content

Commit

Permalink
Set timezone to UTC
Browse files Browse the repository at this point in the history
Make us independent from changes to pg_regress' hard-coded Pacific time
zone.
  • Loading branch information
df7cb committed Oct 4, 2024
1 parent 72fd5a9 commit c66f9f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions expected/datatypes.out
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ COPY: \N
--
----------------------------------------------------------------------------------------------
--
set timezone = 'Etc/UTC';
create table timestamptz (x timestamptz);
insert into timestamptz values ('2000-01-01 00:00'), ('100-01-01 BC 2:22'), ('infinity'), ('-infinity'), (null);
\set relname timestamptz
Expand Down Expand Up @@ -744,9 +745,9 @@ Block 0 ********************************************************

<Data> -----
Item 1 -- Length: 32 Offset: 8160 (0x1fe0) Flags: NORMAL
COPY: 2000-01-01 08:00:00.000000+00
COPY: 2000-01-01 00:00:00.000000+00
Item 2 -- Length: 32 Offset: 8128 (0x1fc0) Flags: NORMAL
COPY: 0100-01-01 10:22:00.000000+00 BC
COPY: 0100-01-01 02:22:00.000000+00 BC
Item 3 -- Length: 32 Offset: 8096 (0x1fa0) Flags: NORMAL
COPY: infinity
Item 4 -- Length: 32 Offset: 8064 (0x1f80) Flags: NORMAL
Expand Down
5 changes: 3 additions & 2 deletions expected/datatypes_3.out
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ COPY: \N
--
----------------------------------------------------------------------------------------------
--
set timezone = 'Etc/UTC';
create table timestamptz (x timestamptz);
insert into timestamptz values ('2000-01-01 00:00'), ('100-01-01 BC 2:22'), ('infinity'), ('-infinity'), (null);
\set relname timestamptz
Expand Down Expand Up @@ -744,9 +745,9 @@ Block 0 ********************************************************

<Data> -----
Item 1 -- Length: 32 Offset: 8160 (0x1fe0) Flags: NORMAL
COPY: 2000-01-01 08:00:00.000000+00
COPY: 2000-01-01 00:00:00.000000+00
Item 2 -- Length: 32 Offset: 8128 (0x1fc0) Flags: NORMAL
COPY: 0100-01-01 10:22:00.000000+00 BC
COPY: 0100-01-01 02:22:00.000000+00 BC
Item 3 -- Length: 32 Offset: 8096 (0x1fa0) Flags: NORMAL
COPY: infinity
Item 4 -- Length: 32 Offset: 8064 (0x1f80) Flags: NORMAL
Expand Down
1 change: 1 addition & 0 deletions sql/datatypes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ insert into timestamp values ('2000-01-01 00:00'), ('100-01-01 BC 2:22'), ('infi
\set relname timestamp
\ir run_test.sql

set timezone = 'Etc/UTC';
create table timestamptz (x timestamptz);
insert into timestamptz values ('2000-01-01 00:00'), ('100-01-01 BC 2:22'), ('infinity'), ('-infinity'), (null);
\set relname timestamptz
Expand Down

0 comments on commit c66f9f0

Please sign in to comment.