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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
_ "time/tzdata"
|
_ "time/tzdata"
|
||||||
|
|
||||||
reaper "github.com/ramr/go-reaper"
|
reaper "github.com/ramr/go-reaper"
|
||||||
|
@ -12,4 +15,13 @@ import (
|
||||||
//nolint:gochecknoinits
|
//nolint:gochecknoinits
|
||||||
func init() {
|
func init() {
|
||||||
go reaper.Reap()
|
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