Fix not loading timezones on all operating systems

This commit is contained in:
kolaente 2020-06-30 09:55:46 +02:00
parent 53c4637fb6
commit 1c93aab7e0
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
3 changed files with 7 additions and 1 deletions

View file

@ -26,6 +26,7 @@ import (
"strings"
"time"
"4d63.com/tz"
"github.com/spf13/viper"
)
@ -159,7 +160,7 @@ var timezone *time.Location
// it way easier, especially when testing.
func GetTimeZone() *time.Location {
if timezone == nil {
loc, err := time.LoadLocation(ServiceTimeZone.GetString())
loc, err := tz.LoadLocation(ServiceTimeZone.GetString())
if err != nil {
fmt.Printf("Error parsing time zone: %s", err)
os.Exit(1)