]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix timezone dependence in test_misc/012_ddlutils.pl
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 29 Apr 2026 15:58:15 +0000 (11:58 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 29 Apr 2026 16:00:32 +0000 (12:00 -0400)
The tests introduced in c529ee38b9e are timezone sensitive.

Pin the cluster's timezone to UTC at init time so timestamptz output
is deterministic regardless of the host's local timezone.

src/test/modules/test_misc/t/012_ddlutils.pl

index b11d4777cccd9d45d00020a48deb1995d2f038be..a0e21c69fb59d78f308827cf5f662ef4dd2ae356 100644 (file)
@@ -15,6 +15,9 @@ use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
+# Force UTC so that timestamptz values (e.g. VALID UNTIL) render the same
+# way regardless of the host's local timezone.
+$node->append_conf('postgresql.conf', "timezone = 'UTC'\n");
 $node->start;
 
 # Perl helper that strips locale/collation details from DDL output so