How can I get the difference between two times in hours?

I want to get the time between two times in hours. How would I do this?

local time1 = os.time()
--current time+1 hour+half an hour(in seconds)
local time2 = os.time()+3600+1800

--difference in seconds(remove math.abs for negative values)
local diff = math.abs(os.difftime(time1, time2))

--60 minutes --> 3600 seconds
local hours = diff/3600
print(hours) --1.5 hours