Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to use os.Time to print when its 8 pm?

if os.Time("*T",hour) == 20 then
	print("Its Time")
end

And what timezone does this use? UTC? Or EST

1 comment

0

check the wiki, it uses the UTC timezone.

1 answer

✓ Accepted answer

what you actually want to do is os.date("*t", os.time()). which will return a table, and then you can index .hour on it..

for instance:

local currentDate = os.date("*t", os.time())
if(currentDate.hour == 20) then
	print("it's 8 PM")
end

learn more here

2 comments

0

thanks but what timezone does this use?

0

unsure

This discussion is preserved as it was. New answers, comments, and votes are closed.