I earned the necromancer badge 1 hour ago. I wasn't online 1 hour ago. I earned it for a post which was last edited on the 10th of September, last year. What's going on here?
Badges are awarded in a batch process. The batch process ran 1 hour ago.
Moreover, the necromancer badge has a vote requirement; you need 5 upvotes on the post before it is eligible for the badge, and you don't need to be online to receive votes either. :-)