精简代码

This commit is contained in:
Peleus 2023-12-28 11:29:53 +08:00
parent 4a30a86d5d
commit 5e342c1522

View File

@ -3,9 +3,7 @@ package carbon
// SetTestNow sets a test Carbon instance (real or mock) to be returned when a "now" instance is created.
// 设置当前测试时间
func (c *Carbon) SetTestNow(carbon Carbon) {
c.testNow = carbon.TimestampNano()
c.loc = carbon.loc
c.loc = carbon.loc
c.testNow, c.loc = carbon.TimestampNano(), carbon.loc
}
// UnSetTestNow clears a test Carbon instance (real or mock) to be returned when a "now" instance is created.