blixify-server 0.3.9 → 0.3.10
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.
|
@@ -824,7 +824,7 @@ class MongoWrapper {
|
|
|
824
824
|
const dataList = [];
|
|
825
825
|
const queryId = (_u = aggregate.queryId) !== null && _u !== void 0 ? _u : "";
|
|
826
826
|
const dateId = (_v = aggregate.dateId) !== null && _v !== void 0 ? _v : "baseUpdatedAt";
|
|
827
|
-
const timezone = aggregate.timezone || "Asia/
|
|
827
|
+
const timezone = aggregate.timezone || "Asia/Kuala_Lumpur";
|
|
828
828
|
const dateRanges = (_w = aggregate.range) !== null && _w !== void 0 ? _w : [
|
|
829
829
|
(0, moment_timezone_1.default)().tz(timezone).format("DD/MM/YYYY HH:mm:ss"),
|
|
830
830
|
];
|
|
@@ -837,11 +837,11 @@ class MongoWrapper {
|
|
|
837
837
|
const isDuration = date.length === 2;
|
|
838
838
|
const isValidStartDate = (0, moment_timezone_1.default)(startDate, "DD/MM/YYYY").isValid();
|
|
839
839
|
const isValidEndDate = (0, moment_timezone_1.default)(endDate, "DD/MM/YYYY").isValid();
|
|
840
|
-
const isoStartDate =
|
|
841
|
-
.tz(timezone)
|
|
840
|
+
const isoStartDate = moment_timezone_1.default
|
|
841
|
+
.tz(startDate, "DD/MM/YYYY HH:mm:ss", timezone)
|
|
842
842
|
.toDate();
|
|
843
|
-
const isoEndDate =
|
|
844
|
-
.tz(timezone)
|
|
843
|
+
const isoEndDate = moment_timezone_1.default
|
|
844
|
+
.tz(endDate, "DD/MM/YYYY HH:mm:ss", timezone)
|
|
845
845
|
.toDate();
|
|
846
846
|
if (!isValidStartDate || !isValidEndDate) {
|
|
847
847
|
res
|