From faf19ef67b16c31fdc2872e836ed6d3083f2a6f3 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 2 Nov 2026 14:01:31 -0500 Subject: [PATCH] test: the file-name test's later backup is later in UTC too Co-Authored-By: Claude Opus 5.5 --- internal/backup/archive_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/backup/archive_test.go b/internal/backup/archive_test.go index 6effe79d..fa8cb1fe 100644 --- a/internal/backup/archive_test.go +++ b/internal/backup/archive_test.go @@ -172,7 +172,11 @@ func TestAFailedWriteFileLeavesNothingBehind(t *testing.T) { func TestFileNamesSortByTimeAndAreRecognised(t *testing.T) { earlier := FileName(time.Date(2026, 1, 9, 23, 0, 0, 0, time.UTC)) - later := FileName(time.Date(2026, 1, 10, 1, 0, 0, 0, time.FixedZone("x", 5*3600))) + // 01:00 at UTC-5 is 06:00 UTC: the name is in UTC, not the clock's zone. + later := FileName(time.Date(2026, 1, 10, 1, 0, 0, 0, time.FixedZone("x", -5*3600))) + if later != "minstrel-20260110T060000Z.tar" { + t.Errorf("name = %s, want it in UTC", later) + } if earlier >= later { t.Errorf("%s does not sort before %s", earlier, later) }