From 8c4633f40f5748bffe567f48634d8232db15d268 Mon Sep 17 00:00:00 2001 From: Seednode Date: Sat, 30 Sep 2023 07:49:40 -0500 Subject: [PATCH] Load timezone before displaying first log output, to ensure consistent timestamps --- cmd/root.go | 2 +- cmd/web.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index d9389fe..ef63dd6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "2.0.3" + ReleaseVersion string = "2.0.4" ) var ( diff --git a/cmd/web.go b/cmd/web.go index 8239d03..b7cc893 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -385,13 +385,6 @@ func redirectRoot() httprouter.Handle { } func ServePage(args []string) error { - if Verbose { - fmt.Printf("%s | START: roulette v%s\n", - time.Now().Format(logDate), - ReleaseVersion, - ) - } - timeZone := os.Getenv("TZ") if timeZone != "" { var err error @@ -401,6 +394,13 @@ func ServePage(args []string) error { } } + if Verbose { + fmt.Printf("%s | START: roulette v%s\n", + time.Now().Format(logDate), + ReleaseVersion, + ) + } + bindHost, err := net.LookupHost(Bind) if err != nil { return err