Load timezone before displaying first log output, to ensure consistent timestamps

This commit is contained in:
Seednode 2023-09-30 07:49:40 -05:00
parent fa1e3d126f
commit 8c4633f40f
2 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@ import (
) )
const ( const (
ReleaseVersion string = "2.0.3" ReleaseVersion string = "2.0.4"
) )
var ( var (

View File

@ -385,13 +385,6 @@ func redirectRoot() httprouter.Handle {
} }
func ServePage(args []string) error { func ServePage(args []string) error {
if Verbose {
fmt.Printf("%s | START: roulette v%s\n",
time.Now().Format(logDate),
ReleaseVersion,
)
}
timeZone := os.Getenv("TZ") timeZone := os.Getenv("TZ")
if timeZone != "" { if timeZone != "" {
var err error 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) bindHost, err := net.LookupHost(Bind)
if err != nil { if err != nil {
return err return err