also, why not do a single sprintf?

```
$time_str = sprintf("%02d:%02d:%02d:%02d",
 ...,
 ...,
);
```