From 2753e8d4839410a1b0e769105a692ed9b1e8d58d Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Wed, 24 Sep 2025 13:58:52 +0200 Subject: [PATCH] catch err --- cmd/times_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/times_test.go b/cmd/times_test.go index 4421ed9..788d827 100644 --- a/cmd/times_test.go +++ b/cmd/times_test.go @@ -20,6 +20,7 @@ package cmd import ( "bytes" "fmt" + "log" "os" "strings" "testing" @@ -39,7 +40,10 @@ func dateAtTime(dateFrom time.Time, hour int, min int, sec int) time.Time { func setUTC() { // make sure to have a consistent environment - os.Setenv("TZ", "UTC") + if err := os.Setenv("TZ", "UTC"); err != nil { + log.Fatal(err) + } + loc, _ := time.LoadLocation("UTC") time.Local = loc }