mirror of https://github.com/0xERR0R/blocky.git
28 lines
376 B
Go
28 lines
376 B
Go
//go:build linux
|
|
// +build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
_ "time/tzdata"
|
|
|
|
reaper "github.com/ramr/go-reaper"
|
|
)
|
|
|
|
//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)
|
|
}
|
|
}
|
|
}
|