function str2time(hora)
return tonumber(string.sub(hora, 1, 2)) * 3600 + tonumber(string.sub(hora, 4, 5)) * 60 + tonumber(string.sub(hora, 7, 8))
end
hora_array = {"20:03:02", "20:03:35"}
horaInicial = str2time(hora_array[1])
horaFinal = str2time(hora_array[2])
hora_array = {}
for i = horaInicial, horaFinal do
hora = math.floor(i / 3600)
minuto = math.floor((i - hora * 3600) / 60)
segundo = math.floor(i - hora * 3600 - minuto * 60)
table.insert(hora_array, string.format("%02d:%02d:%02d", hora, minuto, segundo))
end
for i, v in ipairs(hora_array) do print(v) end
ZnVuY3Rpb24gc3RyMnRpbWUoaG9yYSkgCglyZXR1cm4gdG9udW1iZXIoc3RyaW5nLnN1Yihob3JhLCAxLCAyKSkgKiAzNjAwICsgdG9udW1iZXIoc3RyaW5nLnN1Yihob3JhLCA0LCA1KSkgKiA2MCArIHRvbnVtYmVyKHN0cmluZy5zdWIoaG9yYSwgNywgOCkpCmVuZAoKaG9yYV9hcnJheSA9IHsiMjA6MDM6MDIiLCAiMjA6MDM6MzUifQpob3JhSW5pY2lhbCA9IHN0cjJ0aW1lKGhvcmFfYXJyYXlbMV0pCmhvcmFGaW5hbCA9IHN0cjJ0aW1lKGhvcmFfYXJyYXlbMl0pCmhvcmFfYXJyYXkgPSB7fQpmb3IgaSA9IGhvcmFJbmljaWFsLCBob3JhRmluYWwgZG8KCWhvcmEgPSBtYXRoLmZsb29yKGkgLyAzNjAwKQoJbWludXRvID0gbWF0aC5mbG9vcigoaSAtIGhvcmEgKiAzNjAwKSAvIDYwKQoJc2VndW5kbyA9ICBtYXRoLmZsb29yKGkgLSBob3JhICogMzYwMCAtIG1pbnV0byAqIDYwKQogICAgdGFibGUuaW5zZXJ0KGhvcmFfYXJyYXksIHN0cmluZy5mb3JtYXQoIiUwMmQ6JTAyZDolMDJkIiwgaG9yYSwgbWludXRvLCBzZWd1bmRvKSkKZW5kCgpmb3IgaSwgdiBpbiBpcGFpcnMoaG9yYV9hcnJheSkgZG8gcHJpbnQodikgZW5kCgo=