Revert "Fix issue with system time set back (#24131)"
This fix unfortunately introduced a much worse regression that
is affecting many users, so let's revert it for now and rework
it in the next release.
This reverts commit 5ded3917a1.
Fixes https://github.com/systemd/systemd/issues/24984
This commit is contained in:
+12
-11
@@ -394,18 +394,19 @@ static void timer_enter_waiting(Timer *t, bool time_change) {
|
||||
if (v->base == TIMER_CALENDAR) {
|
||||
usec_t b, rebased;
|
||||
|
||||
/* Update last_trigger to 'now' in case the system time changes, so that
|
||||
* next_elapse is not stuck with a future date. */
|
||||
if (time_change)
|
||||
b = ts.realtime;
|
||||
/* If we know the last time this was triggered, schedule the job based relative
|
||||
* to that. If we don't, just start from the activation time. */
|
||||
else if (t->last_trigger.realtime > 0)
|
||||
/* If we know the last time this was
|
||||
* triggered, schedule the job based relative
|
||||
* to that. If we don't, just start from
|
||||
* the activation time. */
|
||||
|
||||
if (t->last_trigger.realtime > 0)
|
||||
b = t->last_trigger.realtime;
|
||||
else if (state_translation_table[t->state] == UNIT_ACTIVE)
|
||||
b = UNIT(t)->inactive_exit_timestamp.realtime;
|
||||
else
|
||||
b = ts.realtime;
|
||||
else {
|
||||
if (state_translation_table[t->state] == UNIT_ACTIVE)
|
||||
b = UNIT(t)->inactive_exit_timestamp.realtime;
|
||||
else
|
||||
b = ts.realtime;
|
||||
}
|
||||
|
||||
r = calendar_spec_next_usec(v->calendar_spec, b, &v->next_elapse);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user