I was going to mention that format_time()'s local variable string[] can not be relied upon persisting upon the function's exit. However, the way the pointer is immediately used, and knowing that stacked values are not being trashed as evidenced by the working example, I let it go. It is poor form though.