Spacecraft Event Time explains the importance of remembering just how darn slow light is; it takes minutes, hours, and in a few cases almost a day for light to travel one way between humans and their furthest clocks!
Other answers here (looking for them now, I might be remembering this complete answers in the form of a comment†) have mentioned that a deep space spacecraft's clock is in some cases updated by the ground from time to time, though I'm not sure if that's necessary. If we know the offset and we're the only viewer of the clock (it's not the Grand Central Terminal clock for example).
- Are deep space spacecraft event time clocks reset at regular or even irregular intervals to keep them "up to date" somehow, or are they generally left free-running (i.e. if it's not broke, don't fix it)?
- If they are, to what timescale are they linked or reset referenced to? (e.g. UTC versus JD and uniform timescales like TAI, TT, and TDB (also see answers to Is GPS time at least “really close” to TAI (International Atomic Time)?)
Bottom line: accelerometers give down, Sun gives azimuth. On-board ephemerides of Earth, Mars, and the location of the rover on Mars, all of which are kept up-to-date by the operations team, allow the HGA to be slewed to track Earth in the sky. There is one more critical instrument and calibration required: the current time.