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 - 1, 5 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
ZnVuY3Rpb24gc3RyMnRpbWUoaG9yYSkgCiAgICByZXR1cm4gdG9udW1iZXIoc3RyaW5nLnN1Yihob3JhLCAxLCAyKSkgKiAzNjAwICsgdG9udW1iZXIoc3RyaW5nLnN1Yihob3JhLCA0LCA1KSkgKiA2MCArIHRvbnVtYmVyKHN0cmluZy5zdWIoaG9yYSwgNywgOCkpCmVuZAoKaG9yYV9hcnJheSA9IHsiMjA6MDM6MDIiLCAiMjA6MDM6MzUifQpob3JhSW5pY2lhbCA9IHN0cjJ0aW1lKGhvcmFfYXJyYXlbMV0pCmhvcmFGaW5hbCA9IHN0cjJ0aW1lKGhvcmFfYXJyYXlbMl0pCmhvcmFfYXJyYXkgPSB7fQpmb3IgaSA9IGhvcmFJbmljaWFsLCBob3JhRmluYWwgLSAxLCA1IGRvCiAgICBob3JhID0gbWF0aC5mbG9vcihpIC8gMzYwMCkKICAgIG1pbnV0byA9IG1hdGguZmxvb3IoKGkgLSBob3JhICogMzYwMCkgLyA2MCkKICAgIHNlZ3VuZG8gPSAgbWF0aC5mbG9vcihpIC0gaG9yYSAqIDM2MDAgLSBtaW51dG8gKiA2MCkKICAgIHRhYmxlLmluc2VydChob3JhX2FycmF5LCBzdHJpbmcuZm9ybWF0KCIlMDJkOiUwMmQ6JTAyZCIsIGhvcmEsIG1pbnV0bywgc2VndW5kbykpCmVuZAoKZm9yIGksIHYgaW4gaXBhaXJzKGhvcmFfYXJyYXkpIGRvIHByaW50KHYpIGVuZA==