How do you get hours from os.Time()?
I tried;
print(((os.time()/3600)%60))
and
print(((os.time()/3600)%60+(os.difftime(tick(),os.time())/3600)))
But they print out weird numbers.
How do you get hours from os.Time()?
I tried;
print(((os.time()/3600)%60))
and
print(((os.time()/3600)%60+(os.difftime(tick(),os.time())/3600)))
But they print out weird numbers.
print(os.time()/(60*60));
That'll print out how many hours have passed since Epoch. If you wanted it to be the hours since the start of the day, it's like this:
print((os.time()%(60*60*24))/(60*60))
This discussion is preserved as it was. New answers, comments, and votes are closed.