According to tradition, this occurred in the year 2230 (1532 b.c.e.). Some say that it was the year that Isaac died (Yov'loth 40:12). According to Talmudic tradition, the dream occurred on Rosh HaShanah, the New Year (Rosh HaShanah 10b, end).
According to this chronology, the king of Egypt at the time was probably Amenhotep I of the 18th Dynasty, who ruled from 1545-1525 b.c.e.
However, it may be necessary to correct the chronology by 18 years (see The Torah Anthology 4:240), so the king would then be Ahmose (1552-1527 b.c.e.), the first king of the 18th Dynasty. It was he who drove the Hyksos out of Egypt. According to conventional chronologies, the reign of Ahmose was from 1570 to 1545 b.c.e.
As mentioned above, however, it may be necessary to make a correction by as much as 163 years (note on Genesis 12:15). The Pharaoh would then be the one who, according to conventional chronologies, reigned in 1695 b.c.e. This would place the Pharaoh in the 14th Dynasty, which was when Egypt was under the rule of the Hyksos. Since very little is known historically of that period, it would explain why there are no historic records of Joseph. Josephus also writes that the Israelites lived in Egypt during the reign of the Hyksos (Contra Apion 1:14).