更新注释信息

This commit is contained in:
Peleus 2024-03-06 09:26:51 +08:00
parent 4454eb844a
commit a08087e583
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ func (c *Carbon) UnmarshalJSON(b []byte) error {
if c.Error != nil {
return c.Error
}
if string(b) == "null" || len(b) == 0 {
if len(b) == 0 || string(b) == "null" {
return nil
}
key, value, tz := c.parseTag()

View File

@ -4,8 +4,8 @@ import (
"time"
)
// StdTime converts Carbon to standard time.Time.
// 将 Carbon 转换成标准 time.Time
// StdTime gets standard time.Time.
// 获取标准 time.Time
func (c Carbon) StdTime() time.Time {
return c.time.In(c.loc)
}