cmd: Use non-deprecated clock.New (#7517)

Switch from using the deprecated `clock.Default()` to `clock.New()`.
Both return the same value of `systemClock`.
This commit is contained in:
Phil Porada 2024-05-31 21:34:39 -04:00 committed by GitHub
parent 12e8b0ce21
commit 764f6c2f7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -8,10 +8,11 @@ import (
"time"
"github.com/jmhodges/clock"
blog "github.com/letsencrypt/boulder/log"
)
// Clock functions similarly to clock.Default(), but the returned value can be
// Clock functions similarly to clock.New(), but the returned value can be
// changed using the FAKECLOCK environment variable if the 'integration' build
// flag is set.
//
@ -26,5 +27,6 @@ func Clock() clock.Clock {
blog.Get().Infof("Time was set to %v via FAKECLOCK", targetTime)
return cl
}
return clock.Default()
return clock.New()
}