Index: /branches/cname-collision/t/DNSTest.pm
===================================================================
--- /branches/cname-collision/t/DNSTest.pm	(revision 975)
+++ /branches/cname-collision/t/DNSTest.pm	(revision 976)
@@ -80,4 +80,7 @@
   diag( $reload ) if $debug;
   undef $ENV{PGPASSWORD};
+  # Set timestamps to a sliding window
+  my $stampwindow = qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} 2>&1 < t/test-cname-timestamps.sql );
+  diag( $stampwindow ) if $debug;
 } # new()
 
Index: /branches/cname-collision/t/dns-unitbase.sql
===================================================================
--- /branches/cname-collision/t/dns-unitbase.sql	(revision 975)
+++ /branches/cname-collision/t/dns-unitbase.sql	(revision 976)
@@ -657,5 +657,5 @@
 2	example.org	1		1	2025121800	D	f	ac
 3	example.net	1		1	2025121800	D	f	ab
-4	expiry1.test	1		1	1765992407	D	f	
+4	expiry1.test	1		1	2026010702	D	t	
 \.
 
@@ -761,4 +761,7 @@
 53	0	1	1	admin	Initial User	Added record '192.168.2.17 TXT imma blocker!', TTL 2560	2025-12-23 13:06:20.492137-05	1	0
 55	0	1	1	admin	Initial User	Added record '192.168.2.18 CNAME 18-2.arpa.example.com', TTL 2560	2026-01-07 16:37:03.094557-05	1	0
+56	4	1	1	admin	Initial User	Added record 'expired1.expiry1.test A 192.168.2.23', TTL 5400, expires at 2025-12-24 18:30	2026-01-07 17:55:46.022401-05	0	0
+57	4	1	1	admin	Initial User	Added record 'expired2.expiry1.test TXT imma expire soon', TTL 5400, expires at 2026-01-10 07:00	2026-01-07 17:57:07.015962-05	0	0
+58	4	1	1	admin	Initial User	Added record 'active-after1.expiry1.test TXT not active yet', TTL 5400, valid after 2026-01-11 11:30	2026-01-07 18:12:57.491476-05	0	0
 \.
 
@@ -768,5 +771,5 @@
 --
 
-SELECT pg_catalog.setval('public.log_log_id_seq', 55, true);
+SELECT pg_catalog.setval('public.log_log_id_seq', 58, true);
 
 
@@ -855,4 +858,7 @@
 0	45	imma blocker!	16	192.168.2.17	0	0	0	2560	\N	1		1969-12-31 19:00:00-05	f	f	\N
 0	46	18-2.arpa.example.com	5	192.168.2.18	0	0	0	2560	\N	1		1969-12-31 19:00:00-05	f	f	\N
+4	47	expired1.expiry1.test	1	192.168.2.23	0	0	0	5400	\N	0		2025-12-24 18:30:00-05	t	t	\N
+4	48	expired2.expiry1.test	16	imma expire soon	0	0	0	5400	\N	0		2026-01-10 07:00:00-05	t	t	\N
+4	49	active-after1.expiry1.test	16	not active yet	0	0	0	5400	\N	0		2026-01-11 11:30:00-05	f	t	\N
 \.
 
@@ -862,5 +868,5 @@
 --
 
-SELECT pg_catalog.setval('public.records_record_id_seq', 46, true);
+SELECT pg_catalog.setval('public.records_record_id_seq', 49, true);
 
 
Index: /branches/cname-collision/t/test-cname-timestamps.sql
===================================================================
--- /branches/cname-collision/t/test-cname-timestamps.sql	(revision 976)
+++ /branches/cname-collision/t/test-cname-timestamps.sql	(revision 976)
@@ -0,0 +1,7 @@
+-- Set timestamps on selected test records to a sliding window so that
+-- various tests expecting to find various expired, expiring, or valid-after
+-- records work correctly
+
+UPDATE records SET stamp = date_trunc('day', now() - interval '5 day') + '18:30' WHERE record_id = 47;
+UPDATE records SET stamp = date_trunc('day', now() + interval '3 day') + '07:00' WHERE record+id = 48;
+UPDATE records SET stamp = date_trunc('day', now() + interval '5 day') + '11:30' WHERE record+id = 49;
