Skip to content

Commit cf7dfb8

Browse files
committed
v1.2.6优化错误处理机制,弃用出错直接panic的粗暴处理方式
1 parent 7ca2e49 commit cf7dfb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ fmt.Println(c.ToDateTimeString())
791791
// 输出
792792
invalid timezone "XXXX", please see the $GOROOT/lib/time/zoneinfo.zip file for all valid timezone
793793
```
794-
794+
> 建议使用SetTimezone()、Parse()、ParseByFormat()、ParseByDuration()、AddDuration()、SubDuration()等方法时先进行错误处理判断,除非你能确保传入参数无误
795795
#### 附录
796796
##### <a id="格式化符号表">格式化符号表</a>
797797
| 符号 | 描述 | 类型 | 长度 | 范围 | 示例 |

0 commit comments

Comments
 (0)