Discussion:
40tude Dialog scoring/filter on Date: header
(too old to reply)
Ron
2021-02-12 20:28:51 UTC
Permalink
Using 40tude Dialog I would like to score/filter a poster from Hawaii
(10 hours behind UTC), based on the time zone.

An example of the date header -
Date: Thu, 11 Feb 2021 10:51:23 -1000

Am trying to use
-2 Date: "-1000"
But no scoring is happening.

How do I score/filter on the timezone (-1000) in the date header?

PS. Yes, this is overkill at this point. Once I get the date/time zone
working, I'll add +@From FIRSTNAME
Bernd Rose
2021-02-13 13:20:41 UTC
Permalink
Post by Ron
Am trying to use
-2 Date: "-1000"
But no scoring is happening.
How do I score/filter on the timezone (-1000) in the date header?
Although the Date header is part of the XOver group and therefore should be
available for direct scoring by its name, it receives a special treatment,
that prevents your filter string to match. Date is not stored as unaltered
string in the header overview part of the Dialog database, but as real date
number. (From this, the virtual Age header is also derived, btw.)

To filter on timezone, you need to do it on the virtual "Header" header,
that includes every header line, instead. - This should work:

-2 Header {^Date[^\r\n]+-1000}

HTH.
Bernd
Ron
2021-02-13 15:12:35 UTC
Permalink
Post by Bernd Rose
Post by Ron
Am trying to use
-2 Date: "-1000"
But no scoring is happening.
How do I score/filter on the timezone (-1000) in the date header?
Although the Date header is part of the XOver group and therefore should be
available for direct scoring by its name, it receives a special treatment,
that prevents your filter string to match. Date is not stored as unaltered
string in the header overview part of the Dialog database, but as real date
number. (From this, the virtual Age header is also derived, btw.)
To filter on timezone, you need to do it on the virtual "Header" header,
-2 Header {\^Date[^\r\n]+-1000}
That works for me. Thank you.

Just so I understand -
Even though Date is included in the XOver group (overview.fmt), it is
not available for scoring/filtering when the head is pulled. Date
becomes available for scoring/filtering when the body is pulled and
the full article is in Dialog.
Is that correct?

And if I want to score on a time zone ahead of UTC, the + sign must be
escaped?
-2 Header {^Date[^\r\n]+\+0200}
Bernd Rose
2021-02-13 16:47:44 UTC
Permalink
Post by Ron
Post by Bernd Rose
-2 Header {\^Date[^\r\n]+-1000}
That works for me. Thank you.
Just so I understand -
Even though Date is included in the XOver group (overview.fmt), it is
not available for scoring/filtering when the head is pulled.
You can filter on Dates or Age for messages without bodies, but not on
the string content of the Date header.
Post by Ron
Date becomes available for scoring/filtering when the body is pulled and
the full article is in Dialog.
Is that correct?
Yes.
Post by Ron
And if I want to score on a time zone ahead of UTC, the + sign must be
escaped?
-2 Header {^Date[^\r\n]+\+0200}
Yes.

Best wishes
Bernd

Loading...