Why can an incorrect system clock prevent VPN connections?

Short answer

An inaccurate system clock can prevent connections across several of the protocols we offer, for two separate reasons. A small error is usually harmless; problems appear once the clock is off by more than the tolerances below. Your time zone does not matter — what matters is that your clock is accurate in UTC terms.

Reason 1: protocols that carry a timestamp

  • VMess embeds a UTC timestamp in its authentication data so the server can reject replayed requests. If your clock differs from the server's by more than about 120 seconds, the server treats the request as invalid.
  • Shadowsocks 2022 also carries a timestamp in its request header for replay protection, with a tolerance of about 30 seconds. This is stricter than VMess.

Reason 2: TLS certificate validity (affects most other protocols)

TLS-based protocols — including Hysteria2 (which runs over QUIC + TLS), AnyTLS, Trojan and VLESS over TLS — normally validate the server certificate, including its validity dates, using your device clock. If certificate validation is enabled and your clock is far enough off that the certificate appears not yet valid or already expired, the handshake fails before any traffic flows. Profiles configured with a different verification policy are an exception.

This is why "fixing the clock" resolves connection problems even on protocols that carry no timestamp of their own.

Symptoms

  • The client reports a successful configuration but no traffic passes.
  • Connections fail immediately, or every node appears dead.
  • Certificate, handshake or "invalid user" errors in the client log.

How to fix it

  • Windows: Settings → Time & language → Date & time → turn on Set time automatically. (Set time zone automatically is convenient but does not fix clock skew — only UTC accuracy matters.) To force a resync, open Command Prompt as Administrator and run w32tm /resync.
  • macOS: System Settings → General → Date & Time → turn on Set time and date automatically.
  • Android: Settings → System → Date & time → turn on Automatic date & time.
  • iOS: Settings → General → Date & Time → turn on Set Automatically.

After correcting the time, restart the client and reconnect.

  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

Cannot use the proxy on Firefox

Firefox does not always follow the system proxy, so it can show no connection while other apps...

Error code: "error: spawn unknown"

This error, fully known as "error: spawn unknown," typically occurs because VS Code cannot locate...

Can't access the internet on Windows after configuration?

Why does Windows show successful configuration but still can't access the internet?   First,...

v2rayN has stopped working on Windows

If you encounter "v2rayN has stopped working."   It may be due to an outdated version of...

It seems like an unknown error has occurred: Error: Command failed sysproxy.exe

It seems like an unknown error has occurred: Error: Command failed sysproxy.exe   Please check...