I know how to get the time, but I don't know how to change the in-game time to that time.
✓ ANSWER ACCEPTED
How do I set the in-game time to current UTC time?
1 answer
✓ Accepted answer
Since the TimeOfDay property is a string value, and os.date() can return the hour, minute, and second of the UTC time, we can use this.
game.Lighting.TimeOfDay = tostring(os.date("!*t").hour.. ":".. os.date("!*t").min.. ":"..os.date("!*t").sec)
Remember that UTC must have the "!*t" within the os.date() function
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
local hour, minute, second = unpack(os.date("!*t"))