精简代码

This commit is contained in:
gouguoyin 2024-11-29 11:23:25 +08:00
parent 717e2f1c79
commit dd496b1aa5

View File

@ -103,9 +103,6 @@ func format2layout(format string) string {
// gets a Location instance by a timezone string.
// 通过时区获取 Location 实例
func getLocationByTimezone(timezone string) (*time.Location, error) {
if timezone == "" {
timezone = defaultTimezone
}
loc, err := time.LoadLocation(timezone)
if err != nil {
err = invalidTimezoneError(timezone)