Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

NET::ERR_CERT_DATE_INVALID: the certificate date is wrong, or the clock is

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Chrome reports NET::ERR_CERT_DATE_INVALID when the server certificate is outside its validity window according to the client clock. Chromium defines that fault as NET_ERROR(CERT_DATE_INVALID, -201). Fix the clock before you renew a certificate that is still valid on other devices.

What the symptom means

Chromium's net_error_list.h states:

The server responded with a certificate that, by our clock, appears to either not yet be valid or to have expired. This could mean:

  1. An attacker is presenting an old certificate for which they have managed to obtain the private key.
  1. The server is misconfigured and is not presenting a valid cert.
  1. Our clock is wrong.

Chrome Help answer 95669 has its own entry headed "Your clock is behind," "Your clock is ahead," or "NET::ERR_CERT_DATE_INVALID":

You can get this error if your computer or mobile device's date and time are inaccurate.

To fix this error, open your device's clock. Make sure the time and date are correct.

Use that vendor fix together with the Chromium meanings above. The same Help page says that for a complete list of error codes you can type chrome://network-errors/ in the search bar.

Likely causes

Cause What you see How to confirm
Device date, time or time zone wrong Many HTTPS sites fail with CERT_DATE_INVALID on one device only Compare the device clock with a known-good clock
Server certificate expired One site fails on every device and browser Certificate details: end date is in the past
Server certificate not yet valid One site fails; start date is in the future Certificate details: start date is after "now"
Stale certificate still served after renewal Failures continue after you expected a renew Serial or fingerprint still matches the old certificate; see certbot renewed but the site still shows the old certificate

Prove the cause before changing anything

All of these are read-only.

1. Read the exact code. On the interstitial, confirm NET::ERR_CERT_DATE_INVALID (or ERR_CERT_DATE_INVALID). A different code needs a different article, including NET::ERR_CERT_AUTHORITY_INVALID.

2. Check the device clock. If automatic time is available, note whether it is on. Compare the displayed local time with another reliable clock. Chromium lists a wrong clock as one of the three meanings of this code.

3. Read the certificate dates in Chrome. On the certificate error page, open the certificate details Chrome offers for that connection (the interstitial's certificate or details control). Opening the Security panel in DevTools is general browser practice, not a step on either cited page. Read the validity start and end dates the server presented. Compare them with the same device's clock. Do not skip the clock check because the dates look "nearly right".

4. Compare another network and device. If only one laptop fails, suspect the clock. If every client fails, suspect the server certificate.

Fix

Correct the client clock when it is wrong. Renew or replace the server certificate when the dates on the certificate are wrong. Chrome Help's antivirus, captive-portal and operating-system update steps sit under the group headed "Your connection is not private," "NET::ERR_CERT_AUTHORITY_INVALID," "ERR_CERT_COMMON_NAME_INVALID," …, which does not name NET::ERR_CERT_DATE_INVALID; those steps belong with those other codes, not with this one.

Client clock

Save the current time settings before you change them. On the device, note whether automatic time is on, and the current time zone, in a text file you control:

echo "auto_time=<on or off as shown> tz=<time zone the device shows>" > device-time-before.txt

Write the values the device shows.

Risk: the next step changes the device date, time or time zone. Kerberos tickets, one-time passwords and already-issued certificates on that device can fail validation until the clock is correct again, and setting a wrong manual time makes more HTTPS sites fail.

Follow Chrome Help for this code: open your device's clock and make sure the time and date are correct. If the operating system offers automatic date and time, you can turn that on as a way to get a correct clock; the page itself only requires that the time and date are correct. Restart Chrome and reload the site.

To undo it: restore automatic or manual time and the time zone recorded in device-time-before.txt.

Server certificate

When every client shows an expired or not-yet-valid certificate for the site, renew or replace the certificate on the origin (or on the load balancer that terminates TLS). The cp paths and reload sequence below are a general example; neither cited page gives them, and paths vary by server.

Save the live certificate files first (paths vary; use the paths your server actually uses):

cp /etc/ssl/example.com/fullchain.pem fullchain-before.pem
cp /etc/ssl/example.com/privkey.pem privkey-before.pem

Risk: the next step replaces the TLS certificate and private key files the web server uses and reloads the web server. A mismatched key or incomplete chain takes HTTPS down for every hostname that shares that pair until you restore the previous files.

Install the new certificate and key, point the server configuration at them, test the configuration, and reload the web server with your normal process.

To undo it: copy fullchain-before.pem and privkey-before.pem back to the live paths and reload the web server again.

Example (illustrative): One office PC shows NET::ERR_CERT_DATE_INVALID for every bank site after a BIOS battery failure set the clock to 2018. Enabling automatic time clears the errors without any server change.

Confirm the fix

  1. Chrome loads the site without the date-invalid interstitial.
  2. The certificate details show a start date earlier than now and an end date later than now on that device's clock.
  3. A second device agrees.

What to watch afterwards

  • After a certificate renewal, confirm the serial Chrome shows matches the new certificate, not an expired one still served by a middle box.
  • Keep automatic time enabled on staff laptops where policy allows it.
  • Work-proxy and antivirus HTTPS-scanning faults under Chrome Help name NET::ERR_CERT_AUTHORITY_INVALID and related codes, not this one; that path is covered in NET::ERR_CERT_AUTHORITY_INVALID. Self-signed RDP warnings are a different surface: replace a self-signed RDP certificate.

Risks and limits

  • Ignoring a real expiry and only adjusting a clock leaves visitors on other devices blocked.
  • Chromium's list defines -201; Chrome Help's DATE_INVALID entry covers the inaccurate clock case, not Chromium's three numbered causes.
  • This code is not NET::ERR_CERT_AUTHORITY_INVALID and not a name mismatch.

Sources