in dialer.go [506:525]
func validClientCert(
ctx context.Context, cn instance.ConnName,
l debug.ContextLogger, expiration time.Time,
) bool {
// Use UTC() to strip monotonic clock value to guard against inaccurate
// comparisons, especially after laptop sleep.
// See the comments on the monotonic clock in the Go documentation for
// details: https://pkg.go.dev/time#hdr-Monotonic_Clocks
now := time.Now().UTC()
valid := expiration.UTC().After(now)
l.Debugf(
ctx,
"[%v] Now = %v, Current cert expiration = %v",
cn.String(),
now.Format(time.RFC3339),
expiration.UTC().Format(time.RFC3339),
)
l.Debugf(ctx, "[%v] Cert is valid = %v", cn.String(), valid)
return valid
}