This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
api/utils/get_location.go

14 lines
179 B
Go

package utils
import (
"time"
)
func GetLocation(timezone string) *time.Location {
loc, err := time.LoadLocation(timezone)
if err == nil {
return loc
}
return time.UTC
}