I’m currently working on some sort of live time manager for a project I’m working on. I’m coming across this issue where os.time is printing the wrong time by an hour and I can’t work out why.
local timeTable = os.date("!*t", os.time())
print(timeTable.hour.. ":" .. timeTable.min)
My current local time is 08.16 AM but the script is printing 07.16AM.
“!*t” will format the time to UTC, “*t” will format it to your local time. Keep in mind though that if this is used in a server script, the local time will depend on which region the server is in.