Hi, "Plain" et al, This patch should fix the "Can't compute trigger" bug. If you don't know how to apply patches, you can either clone the git repo and build from git master HEAD, or wait for 06.01.02 to come out, which I plan on doing today.
Regards, Dianne.
commit af69f8779d81856310b2bf0b633be95499da6a04 Author: Dianne Skoll <[email protected]> Date: Fri Sep 19 13:18:53 2025 -0400 Don't loop forever if a reminder moves backwards because of a time zone difference. If we are not making progress, it's because the reminder has expired. diff --git a/src/trigger.c b/src/trigger.c index e4e1f9f4..e601c56f 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -554,6 +554,7 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig const *tim y, m, d, omit, result; + int save_nextstart = 0; trig->expired = 0; if (save_in_globals) { LastTrigValid = 0; @@ -617,14 +618,24 @@ int ComputeTriggerNoAdjustDuration(int today, Trigger *trig, TimeTrig const *tim /** FIXME: If a timed reminder moves to yesterday because of a time zone adjustment, try again! */ - if (trig->tz) { TimeTrig copy = *tim; int new_result; ExitTimezone(trig->tz); new_result = AdjustTriggerForTimeZone(trig, result, ©); EnterTimezone(trig->tz); - if (new_result + duration_days < today) { + if (result + duration_days >= today && + new_result + duration_days < today) { + /* If we are not making progress, then give up: It's expired */ + if (nextstart <= save_nextstart) { + trig->expired = 1; + if (DebugFlag & DB_PRTTRIG) { + fprintf(ErrFp, "%s(%s): %s\n", + GetCurrentFilename(), line_range(LineNoStart, LineNo), GetErr(E_EXPIRED)); + } + return -1; + } + save_nextstart = nextstart; nextstart = start+1; start = nextstart; continue; diff --git a/tests/test-timezone-support b/tests/test-timezone-support index 22f966f3..97b90134 100755 --- a/tests/test-timezone-support +++ b/tests/test-timezone-support @@ -161,6 +161,9 @@ debug -t EOF +TZ=America/Toronto $REMIND -s - 2025-09-01@00:00 <<'EOF' >> $OUT 2>&1 +REM 2025-09-24 AT 09:00 TZ America/Denver MSG Dr. Smith +EOF cmp -s $OUT $CMP if [ "$?" = "0" ] ; then echo "Remind: Time zone test PASSED" diff --git a/tests/tz.cmp b/tests/tz.cmp index 56863198..7a23cb53 100644 --- a/tests/tz.cmp +++ b/tests/tz.cmp @@ -78,3 +78,4 @@ trig("Mon at 00:00 TZ Australia/Sydney", "Tue at 00:00 TZ America/Toronto", "Wed -stdin-(14:21): Trig(tz_adj Australia/Sydney) = Saturday, 6 September, 2025 AT 10:00 -stdin-(14:21): Trig = Monday, 1 September, 2025 AT 14:42 2025-09-01 +2025/09/24 * * * 660 11:00am Dr. Smith
_______________________________________________ Remind-fans mailing list [email protected] https://dianne.skoll.ca/mailman/listinfo/remind-fans Remind is at https://dianne.skoll.ca/projects/remind/
