For a status report showing each command sended and execution of the program, I want to add a time stamp in the beginning of each line of it. To obtain a more clear result, I want all characters in the same space, but I can´t achieve it due to the hour field, as shown in this example:
8:57:43 command example1
10:01:07 command example2
I have seen how to remove the leading zeros (with #) from minutes and seconds, but not how to add it to the hour, which is what I´m looking for.
I know that there is another option: split the string, analyze the hour and add a initial space if is under 10, but it looks a quite dirty solution. So I guess it can be implemented with the time format string. Somebody knows how?
Thanks.
Gatet