v2.3.2 优化 String 方法

This commit is contained in:
Peleus 2024-01-02 23:29:22 +08:00
parent 92e71c92e7
commit c02f5733ac

View File

@ -18,7 +18,7 @@ func (c Carbon) String() string {
if key == "format" {
return c.Format(value, tz)
}
return c.ToDateTimeString(tz)
return c.ToDateTimeString(c.Location())
}
// ToString outputs a string in "2006-01-02 15:04:05.999999999 -0700 MST" layout.