Assuming there is no attack/bug and I use NTP: Are there any formal guarantees about the accuracy of the local time? Can there be any over the network?
Even if the communication is going directly between the time server (stratum-1) and the client, I have no idea if the devices / protocols on OSI layer 1-4 have time guarantees.
Maybe something like the following can be guaranteed: With a probability of 99% the currently set local time is off by less than 20ms.
(I've added the "cryptography" tag as certificates are also only valid for a given time - in this case it would be important to have a guarantee even with a possible attacker)
What I found
Clock synchronization at the 10 millisecond level over long distance wide-area networks (WANs) (2000 km), and at the 1 millisecond level for local-area networks (LANs), is routinely achieved.
Source: Cisco, Network Time Protocol: Best Practices White Paper. 2008.