blob: 2bceaf663560a3cb12f8a6920490a9431058b00d [file] [log] [blame]
Jan Engelhardtad326ef2007-09-23 15:17:42 +00001This matches if the packet arrival time/date is within a given range. All
2options are optional, but are ANDed when specified.
3.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01004\fB\-\-datestart\fP \fIYYYY\fP[\fB\-\fP\fIMM\fP[\fB\-\fP\fIDD\fP[\fBT\fP\fIhh\fP[\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]]]]]
Jan Engelhardtad326ef2007-09-23 15:17:42 +00005.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01006\fB\-\-datestop\fP \fIYYYY\fP[\fB\-\fP\fIMM\fP[\fB\-\fP\fIDD\fP[\fBT\fP\fIhh\fP[\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]]]]]
Jan Engelhardtad326ef2007-09-23 15:17:42 +00007.IP
8Only match during the given time, which must be in ISO 8601 "T" notation.
9The possible time range is 1970-01-01T00:00:00 to 2038-01-19T04:17:07.
10.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010011If \-\-datestart or \-\-datestop are not specified, it will default to 1970-01-01
Jan Engelhardtad326ef2007-09-23 15:17:42 +000012and 2038-01-19, respectively.
13.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010014\fB\-\-timestart\fP \fIhh\fP\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]
Jan Engelhardtad326ef2007-09-23 15:17:42 +000015.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010016\fB\-\-timestop\fP \fIhh\fP\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]
Jan Engelhardtad326ef2007-09-23 15:17:42 +000017.IP
18Only match during the given daytime. The possible time range is 00:00:00 to
1923:59:59. Leading zeroes are allowed (e.g. "06:03") and correctly interpreted
20as base-10.
21.TP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020022[\fB!\fP] \fB\-\-monthdays\fP \fIday\fP[\fB,\fP\fIday\fP...]
Jan Engelhardtad326ef2007-09-23 15:17:42 +000023.IP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020024Only match on the given days of the month. Possible values are \fB1\fP
25to \fB31\fP. Note that specifying \fB31\fP will of course not match
Jan Engelhardtad326ef2007-09-23 15:17:42 +000026on months which do not have a 31st day; the same goes for 28- or 29-day
27February.
28.TP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020029[\fB!\fP] \fB\-\-weekdays\fP \fIday\fP[\fB,\fP\fIday\fP...]
Jan Engelhardtad326ef2007-09-23 15:17:42 +000030.IP
Jan Engelhardtc6775d62010-07-23 21:23:05 +020031Only match on the given weekdays. Possible values are \fBMon\fP, \fBTue\fP,
32\fBWed\fP, \fBThu\fP, \fBFri\fP, \fBSat\fP, \fBSun\fP, or values from \fB1\fP
33to \fB7\fP, respectively. You may also use two-character variants (\fBMo\fP,
34\fBTu\fP, etc.).
Jan Engelhardtad326ef2007-09-23 15:17:42 +000035.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010036\fB\-\-utc\fP
Jan Engelhardtad326ef2007-09-23 15:17:42 +000037.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010038Interpret the times given for \fB\-\-datestart\fP, \fB\-\-datestop\fP,
39\fB\-\-timestart\fP and \fB\-\-timestop\fP to be UTC.
Jan Engelhardtad326ef2007-09-23 15:17:42 +000040.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010041\fB\-\-localtz\fP
Jan Engelhardtad326ef2007-09-23 15:17:42 +000042.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010043Interpret the times given for \fB\-\-datestart\fP, \fB\-\-datestop\fP,
44\fB\-\-timestart\fP and \fB\-\-timestop\fP to be local kernel time. (Default)
Jan Engelhardtad326ef2007-09-23 15:17:42 +000045.PP
46EXAMPLES. To match on weekends, use:
47.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010048\-m time \-\-weekdays Sa,Su
Jan Engelhardtad326ef2007-09-23 15:17:42 +000049.PP
50Or, to match (once) on a national holiday block:
51.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010052\-m time \-\-datestart 2007\-12\-24 \-\-datestop 2007\-12\-27
Jan Engelhardtad326ef2007-09-23 15:17:42 +000053.PP
54Since the stop time is actually inclusive, you would need the following stop
55time to not match the first second of the new day:
56.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010057\-m time \-\-datestart 2007\-01\-01T17:00 \-\-datestop 2007\-01\-01T23:59:59
Jan Engelhardtad326ef2007-09-23 15:17:42 +000058.PP
59During lunch hour:
60.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010061\-m time \-\-timestart 12:30 \-\-timestop 13:30
Jan Engelhardtad326ef2007-09-23 15:17:42 +000062.PP
63The fourth Friday in the month:
64.IP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010065\-m time \-\-weekdays Fr \-\-monthdays 22,23,24,25,26,27,28
Jan Engelhardtad326ef2007-09-23 15:17:42 +000066.PP
67(Note that this exploits a certain mathematical property. It is not possible to
68say "fourth Thursday OR fourth Friday" in one rule. It is possible with
69multiple rules, though.)