The cause of this difference may be because in the past...
The cause of this difference may be because in the past, history was jotted on the basis of Abjad (arithmatcal arrangement of Arabic alphabet). In Hazrat Mahdi's (a.t.f.s.) case, the contrariety arose due to the word "Noor" (light) and "Nahr" (river), the differing handwriting of historians gave birth to such variances.25 Hence, if we read "Noor", it will be 256 and in "Nahr", it will be 255 A.H. According to some rare quotes, his birthday has also been cited as the month of Ramadhan of 254 A.H.
or 8th Sha'baan, 257 A.H. The special characteristics of Imam-e-Zaman's (a.t.f.s.) birth gain more significance because from the time of the ninth Imam, Muhammad Taqi (a.s.), the reigning Caliphs became very sensitive on the issue of Imamat. After the martyrdom of Imam Reza (a.s.), there were uprisings by the Hashimites and other children of Imam Moosa al-Kaazim (a.s.) in different nooks and corners of Iran and other parts of the Islamic world.
Splinter groups raised the banner of rebellion against the government and all were coming under one umbrella i.e. the children of Imams (a.s.). All this led to the ruling Caliphate becoming very tense, thereby causing the disintegration of Madina as the capital of the Islamic world. It should be known that the infallible Imams (a.s.) always strove to retain Madina as the city of their residence and never desired to abandon it.
For, Madina was the focal point of travel of all Muslims and was considered to be the religious and spiritual capital of the Islamic world. Notwithstanding the transfer of the political capital of the ruling caliphate, the twin holy cities of Mecca and Madina held their own as the focus (of the Muslims). Today, we don't have any focal point like Mecca and Madina.
The Shia scholars ceased to lend significance to such a centre, maybe out of grave misjudgment, or gross negligence or sheer inability of preservation. Anyway, to the best of their ability, the Imams (a.s.) did not forsake Madina. When the Haj or Umrah pilgrims visited Madina, the Imams (a.s.) or their companions went among the pilgrims and tried to maintain contact with them. Basically, the Abbasides were cunning hypocrites and ostentatious.
From this aspect, they were far ahead of the Ummayyid Caliphs and the Ottoman rulers. Their deportation of Imam Reza (a.s.) from Madina to Khorasan under the ruse of appointing him as the crown prince was a clear poof of their deceit and trickery.