@optimiser/common 1.0.327 → 1.0.328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2217,14 +2217,15 @@ function FilterConditions(condition, match, fields) {
2217
2217
  if (field.Schema.UIDataType === 'date' || field.Schema.UIDataType === 'datetime') {
2218
2218
  var operator = obj.Operator;
2219
2219
  var startCompareDate = void 0, endCompareDate = void 0;
2220
+ // below moment date was converted into utc by Shahzaib on 22/05/2023
2220
2221
  if (operator === "custom") {
2221
- startCompareDate = moment_1.default((_a = obj.Value) === null || _a === void 0 ? void 0 : _a.From, obj.DateFormat).startOf('day');
2222
- endCompareDate = moment_1.default((_b = obj.Value) === null || _b === void 0 ? void 0 : _b.To, obj.DateFormat).endOf('day');
2222
+ startCompareDate = moment_1.default.utc((_a = obj.Value) === null || _a === void 0 ? void 0 : _a.From, obj.DateFormat).startOf('day'); //moment(obj.Value.From).startOf('day');
2223
+ endCompareDate = moment_1.default.utc((_b = obj.Value) === null || _b === void 0 ? void 0 : _b.To, obj.DateFormat).endOf('day'); //moment(obj.Value.To).endOf('day');
2223
2224
  }
2224
2225
  else {
2225
2226
  var _d = helper_1.GetDateRangeFromOperatorValue(operator, obj.FiscalMonth, obj.FiscalFrom), startDate = _d.startDate, endDate = _d.endDate;
2226
- startCompareDate = moment_1.default(startDate, obj.DateFormat).startOf('day');
2227
- endCompareDate = moment_1.default(endDate, obj.DateFormat).endOf('day');
2227
+ startCompareDate = moment_1.default.utc(startDate, obj.DateFormat).startOf('day'); //moment(startDate).startOf('day');
2228
+ endCompareDate = moment_1.default.utc(endDate, obj.DateFormat).endOf('day'); //moment(endDate).endOf('day');
2228
2229
  }
2229
2230
  matchValue = { '$gte': new Date(moment_1.default(startCompareDate).toISOString()), '$lte': new Date(moment_1.default(endCompareDate).toISOString()) };
2230
2231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.327",
3
+ "version": "1.0.328",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {