I had to reset the BIOS on my client and had forgot to update the time. The date was correct, but the time was off by a few hours. My TeamSpeak server would not let me connect due to the time difference. Why would this be? What if I were in a different part of the world?
There is probably a valid and logic reason for this check, but there should be no problems joining a server on the other side of the world, if BOTH systems have their time correctly set.
There is a tolerance which allows to join even if you are living somewhere else.
It uses the UTC time and not the localized time. So your physical location / localization settings are irrelevant.
I’m not entirely sure, but most likely the time is being used in the cryptography for e.g. a time based key rotation, integrity checks (could be timestamped MACs), or something along those lines.
Pretty weird then, being my clock was just 3 hours off from the server.
Well, let’s assume timestamps are only used for MACs as a replay protection. Let’s imagine a hypothetical crypto system such that:
The sender now encrypts their message (p) using a known key (k) and creates a message authentication code (m) including the current timestamp (t). Then the sender sends the encrypted ciphertext (c) and the MAC (m) to the recipient. The sender can then decrypt c and using the timestamp component of m rebuild the rest of m to check integrity and thus authenticity. If now an attacker listens to the transport and “collects” c and m, they could “replay” it (simply send it to the receiver) and pretend to be the sender. To prevent this the receiver checks the time discrepancy between their own time and the timestamp in m. If this is too big the message is rejected as it is most likely a replay. The smaller this time window is the harder it is to perform such attacks. However, picking a window that is too small might result in legitimate packets to be discarded due to latency, clock skew, or other expected factors.
TL;DR
I would expect an offset of 3 hours to be larger than allowed.