dont freak out.
It doesnt really affect the game. The game battery that runs the internal clock has just died. Any time-based events (i.e. berry growth) or things that happen once a day (i.e lottery) will either stop or will be locked into one option (eeveelutions).
Your game itself is still fine.
Source: experience and here