Smart grids are key enablers for creating sustainable energy systems. On the other hand, they introduce a grid management challenge as power grids become more complex and dynamic. Evolving power grids towards smart grids requires combining electric energy technology with communications and information technology. In a distributed network, time synchronization is often one central question. This paper studies limitations of utilizing the widely used Network Time Protocol (NTP) in current 4G cellular networks for smart grid management. As a specific contribution, an improved, NTP based clock adjustment algorithm is proposed to provide more accurate timing information. Finally, the paper studies capabilities of emerging 5G cellular networks to further improve accuracy of timing provided to user equipment (UE).