Hello,
I’m working on my UI for my new game just wondering how would I make a clock based on a specific time zone?
Use Google.
I said clock not day/night script
local data = os.date("!*t", os.time()) -- this will return time in UTC
So if you want to get data for UTC+3 you can do this:
-- 10800 seconds (3 hours)
local data = os.date("!*t", os.time()+10800) -- this will return time for UTC+3 timezone
print(data.hour .. ":" .. data.min)
3 Likes