RE: [exim] Is it possible to perform date comparisons ?

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Herb Martin, Francis Shillitoe
CC: exim-users
Assumpte: RE: [exim] Is it possible to perform date comparisons ?

> > Is it possible to do date comparisons in Exim ?
>
> One of the Exim experts may correct me but I believe
> this is possible, but likely only as a "string" so the
> most difficult issue may be getting the "date" into a
> form you can parse and compare to one of the Exim $tod_xxxx
> formats with 'eq' or maybe even match.


Indeed, it depends on the format you are using in your LDAP database. If
you are using a Unix time_t value, you can compare against $tod_epoch
using the <=> comparators; this is the most flexible because you can also
perform meaningful arithmetic with it. If you are using dates in ISO 8601
format (see RFC 3339) then $tod_log can easily be massaged into a string
which can be compared using lt/eq/gt.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}