Hello,
Is it possible to fetch somehow timestamp of the server on the client side?
I have built a cooldown system (on the backend I save full timestamp) and I want to show the user left cooldown time, but my client has different time generated by Date.now()
than server and it is not precise.
I tried to get timestamp through inject/context like this:
const { rpgEngine } = useContext(RpgReactContext);
console.log(rpgEngine.tick);
and in fact, there is a timestamp, but it is counted only for server uptime (from 0), so it won't work when the cooldown is eg. 1 hour and the server goes down in the meantime.
I could use a socket to send regular time to the client but it seems to me not efficient, isn't it?
Is there a way to fetch the full timestamp?