Can an Incorrect System Clock Prevent a VPN from Authenticating?
Yes, a wrong date or time can break a VPN login. Here is why certificates and time-based codes depend on the clock, how to recognise the problem and how to fix it.
10 min readUpdated Nov 3, 2026By XPASS Editorial Team

You type the right username and password, tap connect, and the VPN app answers with an error. You double-check the details, they are correct, and the same thing happens again. When this happens, almost everyone suspects the password, the server or the Wi-Fi. Very few people look at the small clock in the corner of the screen. Yet a wrong date or time is one of the quieter causes of failed VPN logins, and it is also one of the quickest to fix.
This article explains why an incorrect system clock can stop a VPN from authenticating, which situations make the clock drift or jump, how to recognise the problem from the symptoms, and how to correct it on a phone or computer. It stays on the clock angle. If you want the full list of reasons a login can be refused, read VPN authentication failed: fix login errors, and if you want to understand certificates in more depth, read VPN certificates explained.
Why a VPN cares what time it is
A VPN is not just a pipe. Before any of your traffic flows, the app and the server have to trust each other. The usual way to build that trust is with digital certificates and, in some setups, with codes that change every few seconds. Both of these are tied to time.
A certificate is a small signed document that says "this server really is who it claims to be". Every certificate carries two dates, one for when it starts being valid and one for when it stops. When your app receives a certificate, one of the first checks is whether the current date lies between those two dates. The app does not ask anyone what day it is. It simply reads the clock of the device it runs on.
That is the whole problem in one sentence. The check is only as good as the clock. If the device thinks it is three years ago, a perfectly good certificate looks "not yet valid". If the device thinks it is three years in the future, the same certificate looks "expired". In both cases the app does the safe thing and refuses to continue, because it cannot tell a clock error from a real attack.
The same logic is used across the web. The TLS standard that protects most websites relies on certificate validity periods, and certificate authorities such as Let's Encrypt issue certificates that are valid for a defined window. If you have ever opened a website and seen a warning that a certificate is not valid, and then noticed your laptop showed the wrong year, you have met this exact effect.

What the symptoms look like
A wrong clock does not announce itself politely. The wording you see depends on the app, the protocol and the operating system. Here are the common patterns.
| What you see | Possible link to the clock |
|---|---|
| "Certificate is not valid yet" or "certificate has expired" | Strong hint: the app compared the certificate dates with the wrong time |
| "Authentication failed" with correct credentials | Possible: the server rejected the exchange or the app rejected the server |
| "Connection failed" or a handshake error | Possible, especially if it started suddenly after a reboot or a trip |
| Time-based code is rejected | Strong hint: the code is calculated from the current time |
| Websites also show certificate warnings | Strong hint: the problem is the device, not the VPN |
| Works on a second device, fails on one | Check that one device's date, time and time zone |
The last two rows are the most useful clues. If other secure sites also complain about certificates at the same moment, the clock is a prime suspect, because it affects everything on that device and not only the VPN. If a second phone or laptop connects with the same account without any problem, the account and the pass are probably fine and the difference lies in the device itself.
Time-based codes and the clock
Certificates are only one place where time matters. Many accounts use two-factor authentication with a six-digit code from an authenticator app. These codes are normally built from a shared secret and the current time, using a method described in RFC 6238. Your phone and the server each calculate the code independently. They agree only if their clocks agree closely, because the code changes every thirty seconds or so and servers typically accept just a small window around the current moment.
If your phone's clock is off by a minute or two, the code your phone shows will not match the code the server expects, and you will be told the code is wrong. People often react by typing it faster or requesting a new one, which does not help. The fix is to correct the phone's clock, not to retype. You can read more about how these codes work in what is two-factor authentication.
Your VPN pass itself works differently. With XPASS, the VPNclient app uses the username and password shown on your My Pass page, and a pass has a fixed number of days that start when it is delivered. That is a separate matter from the certificate check. A wrong clock does not change how many days your pass has, but it can interfere with the secure connection that has to be set up before the server can look at your login at all.
Situations that put a clock out of step
Clocks are usually right because the operating system keeps them synchronised with network time sources. They go wrong in a handful of predictable situations.
- A phone that was switched off for a long time. After a very long power-off, some devices start with a stale time until they reach the network and update.
- A laptop whose small internal battery has died. The device forgets the date when powered down and may start at a default date, sometimes years in the past.
- Automatic time turned off, on purpose or by accident. Someone may have turned it off to get around a game timer or to test an app and then forgot.
- Date set by hand. Setting the date forward to skip a waiting period in a game, or backward to extend a trial, leaves the clock wrong for everything else.
- A trip across time zones with the zone set manually. The clock may show a time that looks plausible but belongs to the wrong zone, which means the real moment is off by whole hours.
- A virtual machine, dual-boot setup or older computer that stores local time differently from another system sharing the same hardware clock. This can shift the time by the offset of your time zone.
- No network at startup. If the device has never been able to reach a time source since it was powered on, it keeps whatever it guessed.
Notice that several of these involve moments when you are most likely to need a VPN, such as arriving in a new country or restarting a device after a long flight. Time zones deserve a special note. Many systems store the real time in a universal form and only display it according to your zone. A wrong zone often looks wrong on the screen but can still be correct underneath. A wrong date or a clock that is off by hours in universal time is the serious case.
How to check and fix the clock
The steps are short. Wording varies between versions of each operating system, so treat the menu names below as typical rather than exact.
On an iPhone or iPad
- Open Settings, then General, then Date & Time.
- Turn on Set Automatically.
- Check that the time zone shown matches where you are.
- Connect to the internet through mobile data or Wi-Fi and wait a few seconds.
- Open the VPN app again and try to connect.
On an Android phone or tablet
- Open Settings and look for Date and time, often under System or General management.
- Turn on automatic date and time, and automatic time zone.
- If the setting is greyed out, your device may be controlled by a work or school policy, or the network time option may be provided by the carrier.
- Wait a few seconds, then reopen the VPN app.
On Windows
- Open Settings, then Time and language, then Date and time.
- Turn on Set time automatically and Set time zone automatically.
- Under Additional settings, choose Sync now.
- Restart the VPN app, and restart the computer if the clock was far off.
On a Mac
- Open System Settings, then General, then Date and Time.
- Turn on Set time and date automatically and choose a time source.
- Check the time zone setting.
- Reopen the VPN app.
On Linux
Most desktop distributions use systemd. You can usually open the date and time panel in your desktop settings and turn on automatic time. If you prefer the terminal, the command timedatectl shows the current state and whether network time is active. The details differ between distributions, so check your own documentation if the setting does not behave as expected.
After correcting the clock, test again. Do not change several other things at the same time, because then you will not know what solved it. If the VPN connects, you have found the cause. If it still fails, the clock was not the problem or not the only one, and you can move on to the other checks.
A plain example
Imagine a traveller who has just landed after a long flight. The phone has been in flight mode for hours. During the trip, a friend borrowed it and, to skip a timer in a game, set the date forward by two years and left automatic time off. On the ground the traveller connects to airport Wi-Fi, opens VPNclient, enters the username and password from My Pass, and taps connect. The app reports a login or certificate problem.
The traveller checks the My Pass page. The pass is still active and the details match. They try again and get the same message. They notice that a bank website in the browser also shows a certificate warning. That is the clue: two unrelated services complain at once, so the common factor is the phone. Opening the date and time settings shows the year is wrong. Turning on automatic date and time fixes the date within seconds. The VPN connects on the next attempt.
Nothing was wrong with the password, the pass, the server or the airport network. A single setting on the device had broken the identity checks. This story is a common shape for the problem, though your own symptoms may look different.

Other checks if the clock is correct
If the date, time and zone are all right and the VPN still refuses to authenticate, the clock is not your answer. Work through these in order, one change at a time.
- Confirm that you are using the VPN username and password from My Pass and not your website email or sign-in link.
- Copy and paste the details instead of typing them, and check for stray spaces.
- Confirm that your pass is still active on the My Pass page.
- Update VPNclient to the current version from the official store or download link.
- Restart the app, then the device.
- Try a different network, such as mobile data instead of Wi-Fi, to rule out a network that interferes with the connection.
- If the failure looks like the connection never completes rather than a login refusal, compare it with why a VPN handshake fails.
If you still have no luck after these steps, contact support with the exact message, the time it happened and what you already tried. That information shortens the search considerably.
Limits and what to watch for
It is worth being clear about what this article does and does not claim.
A correct clock is a precondition, not a cure-all. It removes one cause of failure. It does not make a connection secure, it does not guarantee that a VPN will connect, and it does not replace the other checks above. A VPN also cannot repair a clock for you. It does not set your device time, and some apps cannot show you whether the clock is the reason for a failure.
Be careful about the opposite habit as well. Changing the date by hand to work around a trial period, a timer or a licence check is not a good idea. It can break other secure services on the same device, and it may also go against the terms of the service you are trying to get around. If you need to test something that depends on dates, use a separate device or a test environment rather than the phone you rely on every day.
Work or school devices may lock the time settings. If the automatic option is greyed out and you cannot change it, the device is managed by someone else, and the right step is to ask the administrator rather than looking for a workaround.
Finally, some failures that look like clock problems are really network problems. A public network with a sign-in page, a router that is blocking the connection, or a very weak signal can all produce similar messages. If your clock is right and the symptoms continue on several networks, widen the search and use the general guide on what to do when a VPN will not connect.
Keeping the clock right in the future
A little routine prevents most clock trouble.
- Leave automatic date and time and automatic time zone switched on. This is the default on most devices.
- After a very long power-off or after a battery has fully drained, connect to the internet and let the device update before you open sensitive apps.
- If a laptop keeps forgetting the date, the internal battery may be failing, and it is worth having the device checked.
- When you change time zone while travelling, let the device set it itself, and confirm the result with a quick glance at the screen.
- Do not set the date by hand on your main device. Keep experiments on a spare device.
- If a time-based code fails twice, check the clock before requesting another code.
These habits cost nothing and also help everything else on the device, from banking apps to messaging apps and software updates, because they all rely on correct time in one way or another.
Summary
A wrong date or time can stop a VPN from authenticating because certificates are valid only between two dates and time-based codes are calculated from the current moment. The device cannot tell a clock error from an attack, so it refuses to continue even when your username and password are right. Check the date, time and zone first, turn on automatic time, wait a few seconds, and try again. If the clock was correct, move on to credentials, pass validity, the app version and the network. Whenever you need more days on a pass, you can see the options on the pricing page.
Frequently asked questions
Can a wrong system clock really stop a VPN from connecting?
Yes. Encrypted connections check certificates, and every certificate is valid only between two dates. If your device believes it is a different day than it really is, it may decide the server's certificate is not yet valid or has expired and refuse to continue, even though your username and password are correct.
How far off does the clock have to be before it causes trouble?
There is no single number. A date that is off by days, months or years almost always causes errors. Smaller drifts of a few minutes matter for time-based one-time codes, which usually allow only a very short window. Different systems tolerate different amounts.
Will the error message tell me the clock is the problem?
Not always. Some apps say certificate not valid or expired, but many only show a generic authentication failed or connection failed message. Checking the date and time takes a few seconds, so it is a cheap early test.
Does fixing the clock mean my VPN is secure or guaranteed to work?
No. A correct clock removes one common cause of failure, but other causes such as wrong credentials, an expired pass, a blocked network or an outdated app can still stop a connection. It is one check among several.
What is the safest way to keep my clock correct?
Turn on automatic date and time and automatic time zone in your device settings so the operating system keeps itself in step with network time. Avoid setting the date by hand unless you have a specific reason.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a VPN for a short trip or a busy month?
XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.
See passesKeep reading

Troubleshooting
VPN Authentication Failed: Fix Login Errors
What a VPN authentication failed message actually tells you, how to tell a bad password from an expired pass or a clock problem, and a step-by-step way to fix it.
9 min read

VPN Security
VPN Certificates Explained for Beginners
A beginner's guide to the digital certificates behind many VPN connections: what they prove, where they are used, when to install one, and how to read common errors.
10 min read

Troubleshooting
VPN Handshake Failed: Common Causes
A handshake failure means the VPN app and server could not agree on a secure connection. Here are the usual causes in the order worth checking them.
9 min read