During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa.
What could be the reason for this?
Here are some reasons why a hat may or may not have been awarded even though it seems that shouldn't or should have been the case. The example hats given here are completely fictional but totally realistic.
Unless the requirement mentions a specific timezone, hats that are date-based are often awarded for 14 hours before and 12 hours after the specified date in UTC, to accommodate people everywhere in the world. This means you can earn such a hat even though for you it's not even that day yet.
Example: The hat Living in a Box is awarded for voting to close a question on December 26th. To earn this hat, you have to cast a close vote between 12/25 at 10:00 UTC and 12/27 at 12:00 UTC.
To prevent people from posting nonsense just to earn a hat, most hats that require creating content, especially questions and answers, have some requirements that may not be mentioned in the hat description. Generally this involves questions/answers having a positive score (i.e. getting at least one upvote), not being closed/deleted, etc. If the hat has an additional date requirement, it is okay if the upvote comes in after the time is already over, as long as the content was created during the time.
Example: The hat I gave you my heart has the requirement "post an answer while listening to Wham's Last Christmas". This requirement doesn't explicitly mention that the answer has to have a score of at least one. It's okay if the answer is only upvoted after the song is over, as long as it was posted while it was playing.
In some cases, there may be an unmentioned requirement for certain things to be outside your control, lest it be too easy to get a hat. In particular this is often the case for hats involving accepted answers where self-answers are excluded.
Example: The hat We Built This City is awarded for posting an accepted answer that includes references to ten different 80s pop songs. Not explicitly mentioned in the description is the fact that it doesn't count if the answer is on your own question (and thus you could self-accept it).
Most hats' scripts ignore deleted content when deciding whether to award hats. This varies per hat and generally depends on whether it's possible for a <10k user to control whether they have the hat based on deleted content.
Example: The hat First Breath of Winter is awarded for being the first person to answer a question and the answer achieves a score of at least 10. An answer that was posted and deleted before you posted your answer won't prevent you from earning the hat. Similarly, it's also possible that you may earn the hat if you answered the question while one non-deleted answer existed, and that other answer was later deleted.
Sometimes a user fulfills the requirements and thus a hat is awarded, but at some later point the requirements are no longer met, e.g. because a post was downvoted again, or even because there was a bug or design flaw in the hat implementation. In such a case, the user can (usually) keep their hat.
Example: The hat Major Tom (this one, not this one) was awarded during the Summer Bash of 2006 for setting your user name to the name of a planet in our solar system. Users who called themselves "Pluto" before August 24th were allowed to keep the hat.
The Community user is not a real person and thus can't "do" the required things for earning a hat. She's just a special user ID that the system uses in certain places for more or less technical reasons.
That's why some database queries that are used to find deserving hat owners may also return the Community user. And because it's all about fun, we don't filter this user out (like we do e.g. when awarding badges), and so she can in fact earn hats. The Community user's hat on a site can be changed by any moderator on that site.
Example: The hat Legal Alien is awarded for replacing the word "color" with "colour" in five different posts. Suggested edits made by anonymous users are, once accepted, attributed to the Community user. Thus when five anonymous edits include this word replacement, the Community user earns the Legal Alien.
Most hats are awarded for things you do on the main site, but there are a few that are awarded for performing an action on the site's meta. Their requirement generally includes the words "on meta". You still earn these hats on the main site, but you earn them for doing something on its child meta.
Meta Stack Exchange is a bit special in this regard, because it's both a main site and a meta site. For the purposes of Winter Bash, Meta Stack Exchange counts as its own child meta.
Example: The hat Danger Zone is awarded for performing a review. The hat Rick Roll is awarded for voting to reopen a question on meta that has already been closed and reopened at least three times. On Meta Stack Exchange, and only here, it is possible to earn both Rick Roll and Danger Zone for a single action.
- The hat scheduler itself (the process that awards the hats) runs [at differing intervals between 5-15 minutes depending on the hat].
- There are potentially other levels of caching involved as well
- Some hats rely on a certain amount of time passing after a specific action happens before the user will qualify
Please have a little patience before assuming there's a bug in the hat machine.
Example 1: The hat Enjoy the Silence is awarded for posting a question that gets no comments for 48 hours. It's absolutely possible to receive this hat only 48 hours and 7 minutes after posting an eligible question. It's also possible that you may receive the hat if there were comments posted but they were all deleted before the deadline - as before, most hat scripts ignore deleted content.
It's also sometimes possible that you may initially qualify for a hat but cease to qualify for it by the time the script can run and award you the hat.
Example 2: The hat Tonight I'm Gonna Party is awarded for making a post that gets a score of 99. The script for this hat runs every 10 minutes, and the last time the script ran was at 12:30 UTC. If one of your posts gets a score of 99 at 12:32 UTC but gets downvoted to 98 at 12:37 UTC, you won't be awarded the hat on the next script run at 12:40 UTC since it has a score of 98 at that time.