---
title: "Certificate is not yet valid: client clock or a brand-new certificate? | Proofline"
description: "\"Certificate is not yet valid\" means the client's clock reads earlier than the notBefore time of a certificate in the chain."
url: https://proofline.sh/learn/tls-certificate-not-yet-valid-clock-skew/
---

[Learning center](/learn/)

# Certificate is not yet valid: client clock or a brand-new certificate?

"Certificate is not yet valid" means the client's clock reads earlier than the notBefore time of a certificate in the chain. Either the client's clock is behind, or the certificate was issued moments ago and a client a few seconds behind reached it first. Compare the client's clock with a reference and the certificate's notBefore with both; the size of the gap tells the two apart.

Network outages The Proofline team November 23, 2026 5 min read

## The check that fails

Every certificate has a validity period from notBefore through notAfter, inclusive, and the client checks it against its own current time. OpenSSL returns `X509_V_ERR_CERT_NOT_YET_VALID`, `certificate is not yet valid`, when notBefore is after the current time; Node.js reports the code `CERT_NOT_YET_VALID`. [RFC 5280 validity](https://www.rfc-editor.org/rfc/rfc5280#section-4.1.2.5) · [OpenSSL verify error codes](https://docs.openssl.org/3.0/man3/X509_STORE_CTX_get_error/) · [Node.js TLS error codes](https://nodejs.org/api/tls.html)

Go uses one message for both date failures, `x509: certificate has expired or is not yet valid`, and adds the detail that settles which: `current time` followed by its clock `is before` the certificate's notBefore, or `is after` its notAfter. The log line alone shows the gap. [Go x509 verify](https://go.dev/src/crypto/x509/verify.go)

The client compares with its own clock and nothing else. A server cannot fix a client whose clock is wrong, and a client cannot accept a certificate dated in its future.

## Two causes

-   **The client clock is behind.** The host lost time synchronisation, never had it, or booted with a wrong hardware clock. Every certificate issued recently enough looks not yet valid, and every TLS dependency the client calls can fail at once. A container reads the host's clock: Linux time namespaces do not virtualise `CLOCK_REALTIME`, so a container on a skewed host is skewed by the same amount. [time\_namespaces](https://man7.org/linux/man-pages/man7/time_namespaces.7.html)
-   **The certificate is brand new.** A dependency deployed a certificate whose notBefore is the minute it was issued. A client whose clock is a few seconds or minutes behind fails until its clock passes notBefore, then recovers without any change. Only certificates issued very recently trigger it, and only on clients that are behind.

The same clock fault in the other direction makes current certificates look expired: a client running ahead fails with `certificate has expired` near a certificate's notAfter. That case starts at [which certificate expired](/learn/tls-certificate-expired-dependency/).

## Measure the client's clock

On the failing host, read the clock in UTC and the state of the time service. These commands only read. `chronyc tracking` shows `System time`, the offset between chrony's NTP clock and the system clock, and `Leap status`, which reads `Not synchronised` when chrony has no usable source. `chronyc sources` lists the sources it uses. [chronyc](https://chrony-project.org/doc/4.6/chronyc.html)

```
date -u
chronyc tracking
chronyc sources -v
```

On systemd hosts without chrony, `timedatectl status` shows whether network time synchronisation is active, as `System clock synchronized` and `NTP service`; `timedatectl timesync-status` shows systemd-timesyncd's state. [timedatectl](https://man7.org/linux/man-pages/man1/timedatectl.1.html)

```
timedatectl status
timedatectl timesync-status
```

On EC2, the Amazon Time Sync Service answers at 169.254.169.123 (and fd00:ec2::123 on Nitro instances), and a synchronised chrony shows it as the selected source. [Amazon Time Sync Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-ec2-ntp.html)

From inside a container, `date -u` is enough, since it reads the host's clock: [time\_namespaces](https://man7.org/linux/man-pages/man7/time_namespaces.7.html)

```
kubectl exec -n NAMESPACE POD -c CONTAINER -- date -u
```

For a quick outside reference, a web server's `Date` response header gives the time at which the server generated the response, to the second. [RFC 9110 Date](https://www.rfc-editor.org/rfc/rfc9110#section-6.6.1)

```
curl -sI https://www.example.com/ | grep -i '^date:'
```

## Read the certificate's notBefore

Fetch the certificate the dependency serves and print its dates. [openssl s\_client](https://docs.openssl.org/3.0/man1/openssl-s_client/) · [openssl x509 -dates](https://docs.openssl.org/3.0/man1/openssl-x509/)

```
openssl s_client -connect payments.example.com:443 -servername payments.example.com \
  </dev/null 2>/dev/null | openssl x509 -noout -subject -dates
```

Run it from a host whose clock you trust, too. If you saved the chain, `openssl verify -attime` checks it at a time you choose, given in seconds since the Unix epoch, without touching any clock; run it at the failing client's time and again a few minutes later. [openssl verification options](https://docs.openssl.org/3.0/man1/openssl-verification-options/)

```
openssl verify -attime "$(date -u -d '2026-11-23 10:02:00' +%s)" \
  -untrusted intermediates.pem leaf.pem
```

## Read the result

| Client clock vs reference | notBefore vs reference | Points to |
| --- | --- | --- |
| Behind by minutes or more | Days or months ago | Client clock |
| Behind by seconds | Moments ago | New certificate met a slightly slow clock |
| Correct | In the future | Certificate issued with a future date |
| Correct | In the past | Not a date problem; read the full error |

The third row is rare and belongs to the issuer of the certificate. The fourth usually means a different certificate in the chain failed; print each one's dates as in [which certificate expired](/learn/tls-certificate-expired-dependency/).

## A worked example with two outcomes

This example is illustrative. At 10:02 UTC, `checkout` pods on one Kubernetes node log `certificate is not yet valid` calling `payments.example.com`. Pods on other nodes work.

In the first outcome, `date -u` in an affected pod prints 09:41, twenty-one minutes behind. On the node, `chronyc tracking` shows `Leap status : Not synchronised`: a network change blocked NTP to the node, and its clock drifted for days. The payments certificate's notBefore is two weeks old. Every TLS dependency of pods on that node is at risk; the fix is the node's time source.

In the second outcome, the pods' clock is four seconds behind the reference, and the payments certificate's notBefore is 10:01:58 UTC: the payments team renewed it at 10:02. Calls failed for a few seconds, then recovered on their own. Nothing needs fixing beyond tighter time sync, and the payments team may choose to issue certificates before deploying them.

## Limits

`date` and `chronyc` show the clock now. A clock that was stepped back into line after the failure will look correct; chrony's log or the time service's history tells you whether it moved. Errors that stopped on their own around a time step point to the clock.

A client with a wrong clock can fail in other ways too: mutual TLS servers reject a client certificate as expired or not yet valid by their own clock, so check the server's clock when a client certificate looks wrong only to one server. See [mutual TLS client certificate rejected](/learn/mtls-client-certificate-rejected/), and for other layers the [hub for runtime dependency failures](/learn/runtime-dependency-failures/).

## Questions

### Can a container have its own clock?

Not for wall-clock time on Linux. Time namespaces can offset the monotonic and boot-time clocks, but not `CLOCK_REALTIME`, which certificate checks use. A container's wall clock is the host's.

### Why did only one node fail?

All pods on a node share its clock. Errors confined to one node or host, across several TLS dependencies, point at that host's time synchronisation.

### Should the server send certificates with an earlier notBefore?

That is the issuer's choice. The client fix is a synchronised clock, which you can check with `chronyc tracking` or `timedatectl`.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Which certificate expired when a dependency call fails?](/learn/tls-certificate-expired-dependency/)
    
    Network outages The Proofline team November 23, 2026 6 min read
    
-   ### [Mutual TLS rejected: whose certificate failed, and who logs it?](/learn/mtls-client-certificate-rejected/)
    
    Network outages The Proofline team November 23, 2026 6 min read
