Although not the answer to your direct question, I suspect that you are trying to do this in order to get the time separated by colons.
The best way to do this is os.date"%H:%M:%S"
The formatting options are very flexible and use the strftime C. format .
source
share