Probable fix of bug #84117
("date jumps forward when system clock is
KStars keeps time by counting the elapsed milliseconds since an
arbitrary moment in the system time called "sysmark". This is matched
by a corresponding marker for the simulation clock called "julianmark",
which was the exact simulation time at the moment that the system time
So, at any moment, the simulation time is simply
"julianmark + scale * elapsed", where "scale" is the clock scale (1.0
for real-time), and elapsed is the elapsed time since sysmark according
to the system clock. Because the elapsed time is stored as a QTime, it
cannot record time for more than 24 hours (after that long, it resets to
0 hours). We had accounted for this by advancing the date by one
day when we detected that the elapsed time since sysmark had shrunk,
because the only situation we'd thought of where this would occur, is
when the elapsed time wrapped back to 0 after 24 hours.
The bug reporter found another situation where the elapsed time can
shrink (i.e., if the unix clock is set back while KStars is running).
So, we now simply reset sysmark and julianmark whenever the elapsed time
has shrunk. This properly accounts for both situations.
You may see a slight "hiccup" in the time box when reseting the time,
but it immediately recovers.
Thanks very much for noticing and reporting this subtle bug!
svn path=/trunk/kdeedu/kstars/; revision=324187