When the time draws near, a believer’s vision can hardly be false. The truer one of them is in his speech, the truer he is in his vision. Visions are of three types: Good visions are glad tidings from Allah, a terrifying vision caused by the devil, and the ideas which come from within a man. So when one sees anything he dislikes, he should get up and pray, and should not tell it to the people. He said : I like a fetter and dislike a shackle on the neck; a fetter indicates being firmly established in religion. Abu Dawud said : “when the time draws near” means that when the day and night are equal. (Using translation from Abū Dāʾūd 5019)
"إِذَا اقْتربَ الزَّمانُ لم تكدْ رُؤيا المسلم تكذُب؛ وأصدقُكم رؤيا أصدقكم حديثًا، ورؤيا المسلم جزءُ مِنْ خمسة وأربعين جُزءًا من النّبوةِ والرؤيا ثلاث: فالرؤيا الصَّالحةُ بشرى من اللهِ ورُؤيا تَحْزِينٌ من الشيطانِ، ورؤيا مما يحدِّث المرءُ نفسَه فإذا رأى أحدُكم ما يَكْرَهُ فَليقمْ وليتفل ولا يحدِّثْ بها الناسَ، وأُحبُّ القيد فِي النَّوم، وأكره الغُلَّ- القيدُ ثباتُ في الدين".