You can try this
function compareCurrentTime(newSec,newMin,newHour,newDay,newMonth,newYear) -- if not defined any of this then it default the current time value[ all arguments are optional]
local cur = os.date("*t",os.time())
newSec,newMin,newHour = newSec or cur.sec, newMin or cur.min...