diff --git a/contrib/remind-conf-mode/remind-conf-mode.el b/contrib/remind-conf-mode/remind-conf-mode.el index 549e3ca3..60c19e34 100644 --- a/contrib/remind-conf-mode/remind-conf-mode.el +++ b/contrib/remind-conf-mode/remind-conf-mode.el @@ -181,7 +181,7 @@ "timezone" "today" "trig" "trigback" "trigbase" "trigcompletethrough" "trigdate" "trigdatetime" "trigdelta" "trigduration" "trigeventduration" "trigeventstart" "trigfrom" "trigger" "triginfo" "trigistodo" "trigmaxoverdue" "trigpriority" "trigrep" - "trigscanfrom" "trigtags" "trigtime" "trigtimedelta" "trigtimerep" + "trigscanfrom" "trigtags" "trigtime" "trigtimedelta" "trigtimerep" "trigtz" "triguntil" "trigvalid" "typeof" "tzconvert" "upper" "utctolocal" "value" "version" "weekno" "wkday" "wkdaynum" "year" ) diff --git a/man/remind.1.in b/man/remind.1.in index 7079822f..4b4ffaaa 100644 --- a/man/remind.1.in +++ b/man/remind.1.in @@ -4803,6 +4803,11 @@ command. Returns a positive integer N if the "repeat" is of the form Similar to \fBtrigrep()\fR, but returns the repeat used in the \fBAT\fR clause of a timed reminder. .TP +.B trigtz() +If a \fBTZ\fR clause was used in the last \fBREM\fR or \fBIFTRIG\fR +command, returns the time zone name. Otherwise returns the empty +string. +.TP .B trigduration() Returns (as a TIME type) the \fBDURATION\fR parameter of a timed reminder. If there is no \fBDURATION\fR parameter, returns the diff --git a/src/funcs.c b/src/funcs.c index 2f006ba0..a93a11c4 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -192,6 +192,7 @@ static int FTrigtags (func_info *); static int FTrigtime (func_info *); static int FTrigtimedelta (func_info *); static int FTrigtimerep (func_info *); +static int FTrigtz (func_info *); static int FTriguntil (func_info *); static int FTrigvalid (func_info *); static int FTypeof (func_info *); @@ -368,6 +369,7 @@ BuiltinFunc Func[] = { { "trigtime", 0, 0, 0, FTrigtime, NULL }, { "trigtimedelta",0, 0, 0, FTrigtimedelta, NULL }, { "trigtimerep", 0, 0, 0, FTrigtimerep, NULL }, + { "trigtz", 0, 0, 0, FTrigtz, NULL }, { "triguntil", 0, 0, 0, FTriguntil, NULL }, { "trigvalid", 0, 0, 0, FTrigvalid, NULL }, { "typeof", 1, 1, 1, FTypeof, NULL }, @@ -1955,6 +1957,14 @@ static int FTrigtimerep(func_info *info) return OK; } +static int FTrigtz(func_info *info) +{ + if (!LastTrigger.tz) { + return RetStrVal("", info); + } + return RetStrVal(LastTrigger.tz, info); +} + static int FTrigeventduration(func_info *info) { if (LastTrigger.eventduration == NO_TIME) { diff --git a/tests/test.cmp b/tests/test.cmp index 69345bcc..1d063a74 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -24655,6 +24655,7 @@ trigtags trigtime trigtimedelta trigtimerep +trigtz triguntil trigvalid typeof