Subtracting hours from os.date()
snippet in lua

Subtracting hours from os.date()

user5762

print(os.date("%c"))    -- Print current time (08/15/15 10:45:55)

local seconds_since_xxx = os.time() -- Get current time in seconds
seconds_since_xxx = seconds_since_xxx - (60 * 60 * 11)  -- Subtract 11 hours from time

print(os.date("%c", seconds_since_xxx)) -- Print calculated time (08/14/15 23:45:55)