The earlier one.
I think a tie would be decided by the new House of Representatives.
The Electoral Votes are not officially opened and counted until January.
It's the new Cingress since the old term ends and new term begins on January 3rd. From the National Archives website:
"The Congress is scheduled to meet in joint session in the House of Representatives on January 6, 2017 to conduct the official tally of electoral votes. The Vice President, as President of the Senate, is the presiding officer. Two tellers are appointed to open, present and record the votes of the States in alphabetical order. The President of the Senate announces the results of the vote and declares which persons, if any, have been elected President and Vice President of the United States. The results are entered into the official journals of the House and Senate. The President of the Senate then calls for objections to be made. If any objections are registered, they must be submitted in writing and be signed by at least one member of the House and Senate. The House and Senate would withdraw to their respective chambers to consider the merits of any objections according the procedure set out under 3 U.S.C. section 15."