$var(ts)="1584355625"; # Monday, March 16, 2020 10:47:05
if(tmrec_match("20200101T090000|PT8H|monthly||1|3MO||||","$(var(ts){
s.int})")) {
xlog("L_INFO","Epoch $var(ts) matches with 3MO\n");
}else{
xlog("L_INFO","Epoch $var(ts) doesn't match with 3MO\n");
}
$var(ts)="1584960425"; # Monday, March 23, 2020 10:47:05
if(tmrec_match("20200101T090000|PT8H|monthly||1|4MO||||","$(var(ts){
s.int})")) {
xlog("L_INFO","Epoch $var(ts) matches with 4MO\n");
}else{
xlog("L_INFO","Epoch $var(ts) doesn't match with 4MO\n");
}
$var(ts)="1585565225"; # Monday, March 30, 2020 10:47:05
if(tmrec_match("20200101T090000|PT8H|monthly||1|5MO||||","$(var(ts){
s.int})")){
xlog("L_INFO","Epoch $var(ts) matches with 5MO\n");
}else{
xlog("L_INFO","Epoch $var(ts) doesn't match with 5MO\n");
}
$var(ts)="1584960425"; # Monday, March 23, 2020 10:47:05
if(tmrec_match("20200101T090000|PT8H|monthly||1|-1MO||||","$(var(ts){
s.int})")){
xlog("L_INFO","Epoch $var(ts) matches with -1MO\n");
}else{
xlog("L_INFO","Epoch $var(ts) doesn't match with -1MO\n");
}
The results were:
Epoch 1584355625 matches with 3MO
Epoch 1584960425 matches with 4MO
Epoch 1585565225 doesn't match with 5MO
Epoch 1584960425 matches with -1MO
Are we configuring the tmrec_match wrongly?
--
Cumprimentos / Best regards,
David Gonçalves
Research and Development Technician
Phone: +351 256 370 980