snapshots: improve wording for timezone information (#21913)

This commit is contained in:
Michael Eischer
2026-06-24 19:49:07 +02:00
committed by GitHub
parent 7134577c56
commit 981adc47ac
+4 -1
View File
@@ -294,7 +294,10 @@ func PrintSnapshots(stdout io.Writer, list data.Snapshots, reasons []data.KeepRe
// but we display them all in local timezone on this output.
footer := fmt.Sprintf("%d snapshots", len(list))
zoneName := time.Now().Local().Location().String()
tab.AddFooter(fmt.Sprintf("Timestamps shown in %s timezone\n%s", zoneName, footer))
if zoneName == "Local" {
zoneName = "local time"
}
tab.AddFooter(fmt.Sprintf("Timestamps shown in %s\n%s", zoneName, footer))
if multiline {
// print an additional blank line between snapshots