extract time formatter into helper method