From 7c93fc8c379412978e03a0e6b3401fec9906db1d Mon Sep 17 00:00:00 2001 From: Seednode Date: Mon, 17 Jul 2023 07:41:32 -0500 Subject: [PATCH] Added explicit timezone loading --- cmd/root.go | 2 +- cmd/web.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index d78ac06..0122dbe 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -11,7 +11,7 @@ import ( ) const ( - Version string = "0.53.1" + Version string = "0.53.2" ) var ( diff --git a/cmd/web.go b/cmd/web.go index 42e4424..3316823 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -1046,6 +1046,15 @@ func serveVersion() httprouter.Handle { } func ServePage(args []string) error { + timeZone := os.Getenv("TZ") + if timeZone != "" { + var err error + time.Local, err = time.LoadLocation(timeZone) + if err != nil { + return err + } + } + bindHost, err := net.LookupHost(bind) if err != nil { return err