2U interview question

Parse an HH:MM:SS date string and write it in a different format