The issue is not just an avast issue - indeed not particularly an avast issue - it is reported by the Windows Security Center/Centre so not something that avast can prevent.

On windows XP systems there is the W32Time service to take care of this. The default, as I recall, is to perform the synchronization of the clock one per week but there is a tweak to make it more frequent, like once a day - though I have to note it may be a bit overloaded since it often fails to connect according to my system logs.

There may still be free versions of a program I use emanating from the UK called Tardis (the name of the time traveling machine of Dr.Who of the BBC television series) which can also be used to perform the system clock synchronization on a regular basis from a number of reference sources. Probably there are other options out there to be found too.