I’m starting a function to store possible game errors in a DataStore to later analyze them and fix bugs.
For that, I’m using LogService.MessageOut
I need to store the time when the error occurred, exactly as it is shown in the Console today, ie plus milliseconds. os.time() does not show milliseconds. os.clock() is not based on the UNIX epoch. tick() would then be the only viable solution, similar to os.time() but including milliseconds.
But they are saying that tick() will be deprecated.
So what’s the solution to storing UNIX epoch with milliseconds?
DateTime, specifically DateTime.now(), gives the number of milliseconds since the UNIX epoch and already takes into account for times zones (so it’s in GMT time).