I made a typo error above

should be --

second = (sec >> 4)*16 + (sec & $F)