Remove date bug in event logs page

 - Before this commit the filtering on date for offset timing wasnt
 working.
 -After this commit the filtering on date for UTC as well for offset is
 working as expected.

Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: Ib627ce944c269dfe52b2ac4fd5670786ec05bb1f
diff --git a/src/components/Mixins/TableFilterMixin.js b/src/components/Mixins/TableFilterMixin.js
index 7cb7007..1a5425f 100644
--- a/src/components/Mixins/TableFilterMixin.js
+++ b/src/components/Mixins/TableFilterMixin.js
@@ -30,14 +30,24 @@
       propertyKey = 'date'
     ) {
       if (!startDate && !endDate) return tableData;
-      const startDateInMs = startDate ? startDate.getTime() : 0;
-      const endDateInMs = endDate
-        ? endDate.getTime()
-        : Number.POSITIVE_INFINITY;
+      let startDateInMs = startDate ? startDate.getTime() : 0;
+      let endDateInMs = endDate ? endDate.getTime() : Number.POSITIVE_INFINITY;
+
+      const isUtcDisplay = this.$store.getters['global/isUtcDisplay'];
+
+      //Offset preference selected
+      if (!isUtcDisplay) {
+        startDateInMs = startDate
+          ? startDate.getTime() + startDate.getTimezoneOffset() * 60000
+          : 0;
+        endDateInMs = endDate
+          ? endDate.getTime() + endDate.getTimezoneOffset() * 60000
+          : Number.POSITIVE_INFINITY;
+      }
+
       return tableData.filter(row => {
         const date = row[propertyKey];
         if (!(date instanceof Date)) return;
-
         const dateInMs = date.getTime();
         if (dateInMs >= startDateInMs && dateInMs <= endDateInMs) return row;
       });