Use TZ environment variable if present; closes pterodactyl/panel#3036
This commit is contained in:
parent
bc79ce540e
commit
aca9ffc122
|
@ -568,6 +568,10 @@ func (sc *SystemConfiguration) GetStatesPath() string {
|
|||
//
|
||||
// This function IS NOT thread-safe.
|
||||
func ConfigureTimezone() error {
|
||||
tz := os.Getenv("TZ")
|
||||
if _config.System.Timezone == "" && tz != "" {
|
||||
_config.System.Timezone = tz
|
||||
}
|
||||
if _config.System.Timezone == "" {
|
||||
b, err := ioutil.ReadFile("/etc/timezone")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user