Sorry! I didn't notice the other thread on this topic before I started this one. I used the module heartbeat script to fix my mod. Just for anyone's reference, here it is:
int iHour = GetTimeHour ();
int iMinute = GetTimeMinute ();
int iSecond = GetTimeSecond ();
int iMillisecond = GetTimeMillisecond();
SetTime(iHour, iMinute, iSecond, iMillisecond);