1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-02 13:47:00 +02:00

add func to convert time to TZ env time

This commit is contained in:
Deon Thomas 2022-05-10 14:39:51 -04:00
parent 9b186463cb
commit 7fc04e283d
No known key found for this signature in database
GPG Key ID: 0FF7DAE12CA62D67

View File

@ -335,3 +335,8 @@ func NowFromTZEnv() time.Time {
now := time.Now().In(location)
return now
}
func TimeFromTZEnv(input time.Time) time.Time {
location, _ := time.LoadLocation(viper.GetString("TZ"))
return input.In(location)
}