Skip to content

Commit 0faea1f

Browse files
committed
Use the localtime.
1 parent f55b2be commit 0faea1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

certcache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (c *CertCache) readAndValidateCertificate(key string, hosts []string, now t
125125
return nil, fmt.Errorf("Invalid certificate found in %s (%s)", path, err.Error())
126126
}
127127
if !now.Before(x509Cert.NotAfter) {
128-
return nil, fmt.Errorf("Ceritificate no longer valid (not after: %s, now: %s)", x509Cert.NotAfter.Format(time.RFC1123), now.Format(time.RFC1123))
128+
return nil, fmt.Errorf("Ceritificate no longer valid (not after: %s, now: %s)", x509Cert.NotAfter.Local().Format(time.RFC1123), now.Local().Format(time.RFC1123))
129129
}
130130

131131
outer:

0 commit comments

Comments
 (0)