catch err

This commit is contained in:
2025-09-24 13:58:52 +02:00
parent 67d854fbb9
commit 2753e8d483

View File

@@ -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
}