The idea of time scales calculus’ theory was initiated and introduced by Hilger (1988) in his PhD thesis order to unify discret and continuous analysis and to expend the discrete and continous theories to cases ``in between''. Since then, mathematical research in this field has exceeded more than 1000 publications and a lot of applications in the fields of science, i.e., operations research, economics, physics, engineering, statistics, finance and biology. Ostrowski proved an inequality to estimate the absolute deviation of a differentiable function from its integral mean. This result was obtained by applying the Montgomery identity. In the present paper we derive a generalization of the Montgomery identity to the various time scale versions such as discrete case, continuous case and the case of quantum calculus, by obtaining this generalization of Montgomery identity we would prove our results about the generalization of the Ostrowski inequalities (without weighted case) to the several time scales such as discrete case, continuous case and the case of quantum calculus and recapture the several published results of different authors of various papers and thus unify corresponding discrete version and continuous version. Similarly we would also derive our results about the generalization of the Ostrowski inequalities (weighted case) to the different time scales such as discrete case and continuous case and recapture the different published results of several authors of various papers and thus unify corresponding discrete version and continuous version. Moreover, we would use our obtained results (without weighted case) to the case of quantum calculus.