trm-core 9.10.2 → 9.10.3
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/changelog.txt
CHANGED
|
@@ -558,8 +558,10 @@ class RESTClient {
|
|
|
558
558
|
}
|
|
559
559
|
refreshTransportTmsTxt(trkorr) {
|
|
560
560
|
return __awaiter(this, void 0, void 0, function* () {
|
|
561
|
-
yield this._axiosInstance.
|
|
562
|
-
|
|
561
|
+
yield this._axiosInstance.delete('/refresh_tms_transport_txt', {
|
|
562
|
+
data: {
|
|
563
|
+
trkorr
|
|
564
|
+
}
|
|
563
565
|
});
|
|
564
566
|
});
|
|
565
567
|
}
|
|
@@ -23,16 +23,17 @@ function fromAbapToDateLegacy(as4date, as4time) {
|
|
|
23
23
|
const seconds = parseInt(`${aTime[4]}${aTime[5]}`);
|
|
24
24
|
return new Date(year, month, day, hour, minutes, seconds);
|
|
25
25
|
}
|
|
26
|
+
function parseDate(as4date, as4time, ianaZone) {
|
|
27
|
+
const abapDateTime = luxon_1.DateTime.fromFormat(`${as4date} ${as4time}`, "yyyyMMdd HHmmss", { zone: ianaZone });
|
|
28
|
+
if (abapDateTime.isValid) {
|
|
29
|
+
return abapDateTime;
|
|
30
|
+
}
|
|
31
|
+
return luxon_1.DateTime.fromISO(`${as4date}T${as4time}`, { zone: ianaZone });
|
|
32
|
+
}
|
|
26
33
|
function fromAbapToDate(as4date, as4time) {
|
|
27
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
35
|
const ianaZone = yield systemConnector_1.SystemConnector.getTimezone();
|
|
29
|
-
const
|
|
30
|
-
const month = Number(as4date.slice(4, 6));
|
|
31
|
-
const day = Number(as4date.slice(6, 8));
|
|
32
|
-
const hour = Number(as4time.slice(0, 2));
|
|
33
|
-
const minute = Number(as4time.slice(2, 4));
|
|
34
|
-
const second = Number(as4time.slice(4, 6));
|
|
35
|
-
const dt = luxon_1.DateTime.fromObject({ year, month, day, hour, minute, second }, { zone: ianaZone });
|
|
36
|
+
const dt = parseDate(as4date, as4time, ianaZone);
|
|
36
37
|
if (!dt.isValid) {
|
|
37
38
|
return fromAbapToDateLegacy(as4date, as4time);
|
|
38
39
|
}
|