Wow ok that’s a glitch. The only Pokemon you can get from fossils in DPP are Omanyte, Kabuto, Aerodactyl, Lileep, Anorith, Cranidos, and Shieldon (source). If that isn’t enough proof, I looked up where you can find Dialga in Diamond, and the only location was Spear Pillar. Plus, Bulbapedia said there is only 1 in the game.
So, you glitched. That’s kind of crazy. May I ask, have you used cheating devices or glitches in the past? I don’t know much about cheats and glitches, but I’ve heard that some weird stuff happens when you glitch or cheat.
Hope this helps! :)