A friend of mine happens to keep a ground squirrel in a big tank in their home. Said ground squirrel has, of course, been hibernating — and wasn’t fooled for a second by a false spring that got all the humans overly hopeful. Why is that?
Hibernators don’t all rely on environmental cues to tell them when to wake up, though that’s usually everyone’s first guess. Favoured sleeping spots are usually underground, or otherwise well out of the elements, and often bundled up with insulating material like old leaves. There’s no way to sense the outside temperature from there! Instead, some animals will hibernate for a set time period, depending on their species. The most precise example I found was a woodchuck, which wakes up about 180 days after hibernation begins, but the article suggested that there’s a set period for many animals, from all kinds of different species (including bats, marsupials, rodents…)
So there are species that just rely on the temperature, from what I can tell, but there are others that actually have a biological calendar, a circannual rhythm — like humans have a circadian (daily) rhythm. How it works isn’t totally understood, but it probably takes into account a vast range of inputs like the length of days, the levels of light, availability of food and water, temperature, etc, much as the human circadian rhythm does. Hormones like melatonin play a part, just as they do in our circadian rhythms.
This is probably disappointing, since the answer is more or less “we don’t quite understand”, but I’ll tack on another ground squirrel fact to sweeten the pot: ground squirrels do wake during their periods of hibernation, roughly once a week. This waking period allows them to warm up a little and get their blood pumping in order to clear away waste metabolites in their blood. They don’t go outside or forage though: once they’ve warmed up enough to clear the pipes, which usually takes about three hours, they go back to sleep again.