If a goal is scored by a player on the defending team, credit for the goal goes to the last player on the other team to have touched the puck ; this is because own goals in hockey are typically cases where the player so credited had his / her shot deflected, but this convention is used even where this isn't actually the case.
If a goal is scored by a player on the defending team, it is treated as if the defending player played the ball over the back line.
0.005 seconds.