Hi, I want to check how many seconds have passed since a date that is already converted to Unix time, but I’m not sure how to do it.
I have tried using:
math.floor(result.date - os.time()) % 60
But after it reaches 60 it goes back to zero.
Hi, I want to check how many seconds have passed since a date that is already converted to Unix time, but I’m not sure how to do it.
I have tried using:
math.floor(result.date - os.time()) % 60
But after it reaches 60 it goes back to zero.
This is because of this snippet of code:
You can do something like this after getting the current date and old date converted to seconds:
secondsSince = os.time() - oldDate
I did that, but it only prints negative numbers.
Nvm I divided it by 1000 because I noticed that the date was in milliseconds. Thanks for the help it worked.