Clamp trigger() to "1 January 1990 AT 00:00" if UTC flag is used.

This commit is contained in:
Dianne Skoll
2025-08-28 13:30:21 -04:00
parent c5d661124c
commit 5d46df871f
2 changed files with 3 additions and 1 deletions

View File

@@ -2181,6 +2181,7 @@ static int FTrigger(func_info *info)
UTCToLocal(date, tim, &date, &tim);
if (date < 0) {
date = 0;
tim = 0;
}
}
} else if (Nargs > 1) {
@@ -2198,6 +2199,7 @@ static int FTrigger(func_info *info)
UTCToLocal(date, tim, &date, &tim);
if (date < 0) {
date = 0;
tim = 0;
}
}
}

View File

@@ -39472,7 +39472,7 @@ utctolocal(2051-01-01@04:44) => 2050-12-31@23:44
utctolocal(2050-03-13@05:00) => 2050-03-13@00:00
utctolocal(2050-11-06@04:00) => 2050-11-06@00:00
utctolocal(2050-11-06@07:00) => 2050-11-06@02:00
trigger(1990-01-01@01:22, 1) => "1 January 1990 AT 20:22"
trigger(1990-01-01@01:22, 1) => "1 January 1990 AT 00:00"
No reminders.
-stdin-(9): `x' re-SET without being used (previous SET: -stdin-:8)
-stdin-(11): `y' UNSET without being used (previous SET: -stdin-:10)