mirror of https://github.com/0xERR0R/blocky.git
fix: add timezone data to docker container
This commit is contained in:
parent
e585a8bed9
commit
f15c7d3190
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue