mirror of
https://gitee.com/dromara/carbon.git
synced 2024-12-02 04:07:36 +08:00
精简代码
This commit is contained in:
parent
717e2f1c79
commit
dd496b1aa5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user