c2-mongoose 2.1.195 → 2.1.197
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.
package/dist/flow/SearchFlow.js
CHANGED
|
@@ -479,18 +479,18 @@ var SearchFlow = /** @class */ (function () {
|
|
|
479
479
|
var fieldName = key.replace('Range', '');
|
|
480
480
|
var values = value;
|
|
481
481
|
if ((0, Utils_1.isNotEmpty)(values[0])) {
|
|
482
|
-
var momentValue = (0, moment_timezone_1.default)(values[0])
|
|
482
|
+
var momentValue = (0, moment_timezone_1.default)(values[0]);
|
|
483
483
|
momentValue.hour(0);
|
|
484
484
|
momentValue.minute(0);
|
|
485
485
|
momentValue.second(0);
|
|
486
|
-
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $gte: momentValue.toDate() });
|
|
486
|
+
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $gte: momentValue.tz('America/Sao_Paulo', true).toDate() });
|
|
487
487
|
}
|
|
488
488
|
if ((0, Utils_1.isNotEmpty)(values[1])) {
|
|
489
|
-
var momentValue = (0, moment_timezone_1.default)(values[1])
|
|
489
|
+
var momentValue = (0, moment_timezone_1.default)(values[1]);
|
|
490
490
|
momentValue.hour(23);
|
|
491
491
|
momentValue.minute(59);
|
|
492
492
|
momentValue.second(59);
|
|
493
|
-
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $lte: momentValue.toDate() });
|
|
493
|
+
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $lte: momentValue.tz('America/Sao_Paulo', true).toDate() });
|
|
494
494
|
}
|
|
495
495
|
filters.$and.push(condition);
|
|
496
496
|
}
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -423,24 +423,24 @@ abstract class SearchFlow {
|
|
|
423
423
|
var fieldName = key.replace('Range', '')
|
|
424
424
|
var values = value as any
|
|
425
425
|
if (isNotEmpty(values[0])) {
|
|
426
|
-
var momentValue = moment(values[0])
|
|
426
|
+
var momentValue = moment(values[0])
|
|
427
427
|
momentValue.hour(0)
|
|
428
428
|
momentValue.minute(0)
|
|
429
429
|
momentValue.second(0)
|
|
430
430
|
condition[fieldName] = {
|
|
431
431
|
...condition[fieldName],
|
|
432
|
-
$gte: momentValue.toDate()
|
|
432
|
+
$gte: momentValue.tz('America/Sao_Paulo', true).toDate()
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
if (isNotEmpty(values[1])) {
|
|
437
|
-
var momentValue = moment(values[1])
|
|
437
|
+
var momentValue = moment(values[1])
|
|
438
438
|
momentValue.hour(23)
|
|
439
439
|
momentValue.minute(59)
|
|
440
440
|
momentValue.second(59)
|
|
441
441
|
condition[fieldName] = {
|
|
442
442
|
...condition[fieldName],
|
|
443
|
-
$lte: momentValue.toDate()
|
|
443
|
+
$lte: momentValue.tz('America/Sao_Paulo', true).toDate()
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
filters.$and.push(condition)
|