diff --git a/go.mod b/go.mod index 46e900186..89b7d09be 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ module code.vikunja.io/api require ( + 4d63.com/tz v1.1.0 code.vikunja.io/web v0.0.0-20200618164749-a5f3d450d39a gitea.com/xorm/xorm-redis-cache v0.2.0 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 diff --git a/go.sum b/go.sum index 0b2bb87d1..96dec51ca 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,7 @@ +4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f h1:oyYjGRBNq1TxAIG8aHqtxlvqUfzdZf+MbcRb/oweNfY= +4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE= +4d63.com/tz v1.1.0 h1:Hi58WbeFjiUH4XOWuCpl5iSzuUuw1axZzTqIfMKPKrg= +4d63.com/tz v1.1.0/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= diff --git a/pkg/config/config.go b/pkg/config/config.go index 1ffbd2b1f..c2e89088c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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)