I've opened a time capsule and a few gifts by mistake. One delivery I got lucky after opening. Gave the item to the villager and they never mentioned that I opened it.
I always try to be careful to not open them, of course it happened a few times where I
accidentally opened them, which was, of course, dumb of me. Sometimes, I forgot that
I even got a gift from someone and then I look what's inside and yeah...
I felt kinda guilty when I opened or forgot them. After all, the villagers aren't not for a
long time angry to you (or they already forgot that they even gave you something, lol).
I never purposefully open gifts or time capsules. I accidentally opened a time capsule or two in the early days due to not paying enough attention or from pushing the button too fast and hitting Open instead of Bury, but I've tried to be extra careful about it since then.