While I agree, depending on the nature of the magic, canonical midnight might work too. As Harry goes into, a lot of magic is in your head, if it's really your belief in Midnight that's important then either would work (much like Harry's discussion on color in POroven Guilty).
Now, if it's to do with the natural magic flows of the world, then it would need to be literal midnight, but that's actually pretty rare.