EDIT: I just re-read the question and realised I clearly wasn’t paying attention on my first reading – you were asking about when the sun is hidden by a somewhat more solid obstacle than mere clouds, so my answer doesn’t actually answer your question at all, but I figure some people might find it vaguely amusing anyway :-/
There are lots of *other* means of telling the time that don’t rely on the sun, and others will likely mention those – there might be an issue with the question being “societies that used sundials” indicating that they didn’t use other methods, though 😛
Anyway, in the spirit of my general desire to find an answer nobody else comes up with, how about using [a sunstone](https://en.wikipedia.org/wiki/Sunstone_(medieval)) (not [sunstone](https://en.wikipedia.org/wiki/Sunstone)!)
Certain kinds of crystals ([Iceland Spar](https://en.wikipedia.org/wiki/Iceland_spar) being a contender) can react to light in such a way that you can see which direction the sun is even when overcast. Combining this with a sundial* would allow you to tell the time in moderately cloudy conditions 🙂
* or knowing which way’s north plus a bit of geometry 😛
Latest Answers