Quick actions

cmd+k|ctrl+k

Navigation

Languages

time

Snippet info

Language

Lua

Visibility

public

Author

danielmg17

Created

2017-09-29T18:25:03Z

Updated

2017-10-10T00:03:07Z

cur = os.time()
h =(math.floor(cur/60/60)%12-4) --%24 for base 24 time, -4 for eastern time zone
m =(math.floor(cur/60)%60) --minutes
s =(cur%60) --seconds
function writ(t)
    return math.floor(t/10)
end
oh = writ(h)
om = writ(m)
os = writ(s)
io.write(oh,h-oh*10,":",om,m-om*10,":",os,s-os*10)
INFO