Getting a synced number from client and server

What I’m trying to do is find a way to compensate or even sync the tick() or similar for the client and server. What I really need is precision that is shared between the client and server because I am trying to get a number inside an interval and the client/server difference is heavily affecting this. Lag spikes have also impacted this heavily. I have looked up some solutions, but they do not really help solve my problem.

The problem now (example):
Server time: 100
The next update time that the client would send to server through remotes: 200
Client: Sends remote correctly on their side, but the server has it at 201.
When the client has a huge lag spike, the remotes are delayed and when they recover back to low ping, the remote instantly sends, landing them in the interval.
Any suggestions?

Can you be a little more specific with your use case? For the example you gave, I don’t see why not just have the server send the time to the client and avoid having both the server and the client maintain the timer synchronously. With your example, I don’t understand what you mean by “getting a number inside an interval”.