fix: add timezone data to docker container

This commit is contained in:
Dimitri Herzog 2022-11-10 10:08:34 +00:00
parent e585a8bed9
commit f15c7d3190
1 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,9 @@
package main
import (
"fmt"
"os"
"time"
_ "time/tzdata"
reaper "github.com/ramr/go-reaper"
@ -12,4 +15,13 @@ import (
//nolint:gochecknoinits
func init() {
go reaper.Reap()
if tz := os.Getenv("TZ"); tz != "" {
var err error
time.Local, err = time.LoadLocation(tz)
if err != nil {
fmt.Printf("error loading location '%s': %v\n", tz, err)
}
}
}