Azelf appears I believe in some time between 9pm - 10pm - 11pm (Rough time) and Uxie from 1am to 4am (rough time)
The most probable reason you are not getting azelf or uxie is because these two both appear fairly late at night whereas mespirit appears during the day, so thats usually the one most people catch first!
So all you have to do is stay up late and catch these two, at which point you will be able to catch dialga (Once you've captured both). You coyld change your 3DS time to make it later than it actually is, however keep in mind it will take 24-48 hours to appear after resetting the time.
Hope I helped ;)