b07b34
--- ./src/idmef-criterion-value.c	2016-12-04 22:36:21.364349964 +0100
b07b34
+++ ./src/idmef-criterion-value.c	2016-12-04 22:37:40.770573582 +0100
b07b34
@@ -194,22 +194,22 @@
b07b34
         /*
b07b34
          * Apply mask
b07b34
          */
b07b34
-        if ( comp.tm_sec < 0 ) lt.tm_sec = -1;
b07b34
+        if ( comp.tm_sec < 0 ) comp.tm_sec = lt.tm_sec;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
-        if ( comp.tm_min < 0 ) lt.tm_min = -1;
b07b34
+        if ( comp.tm_min < 0 ) comp.tm_min = lt.tm_min;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
-        if ( comp.tm_mon < 0 ) lt.tm_mon = -1;
b07b34
+        if ( comp.tm_mon < 0 ) comp.tm_mon = lt.tm_mon;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
-        if ( comp.tm_hour < 0 ) lt.tm_hour = -1;
b07b34
+        if ( comp.tm_hour < 0 ) comp.tm_hour = lt.tm_hour;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
-        if ( comp.tm_mday < 0 ) lt.tm_mday = -1;
b07b34
+        if ( comp.tm_mday < 0 ) comp.tm_mday = lt.tm_mday;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
-        if ( comp.tm_year < 0 ) lt.tm_year = -1;
b07b34
+        if ( comp.tm_year < 0 ) comp.tm_year = lt.tm_year;
b07b34
         else need_full_compare = TRUE;
b07b34
 
b07b34
         if ( comp.tm_wday < 0 ) lt.tm_wday = -1;