mirror of
https://gitee.com/dromara/carbon.git
synced 2024-12-01 19:58:07 +08:00
精简代码
This commit is contained in:
parent
4a30a86d5d
commit
5e342c1522
4
test.go
4
test.go
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user