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 (
ReleaseVersion string = "2.0.3"
ReleaseVersion string = "2.0.4"
)
var (

View File

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