When you install a new battery, the RTC (real time clock) restarts from 01/01/2000. The game keeps track of played hours, so if you (for example) have played for 10 years and then the battery died you should wait others 10 years to reach the "next day" in-game.
Glad to see that this can be fixed directly with PKHeX.
Personally I use this little homebrew software. That can be used either with a GBA/GBA SP with a GBA flashcart (like EZ Flash Omega) or with a DS/DS lite with a DS flashcart (like R4).