acsi-core 1.1.1 → 1.1.2
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/index.js
CHANGED
|
@@ -3470,19 +3470,23 @@ var utcToLocalTime = (function (time, FORMAT) {
|
|
|
3470
3470
|
});
|
|
3471
3471
|
|
|
3472
3472
|
var timeSpanToLocalMoment = (function (time, timezone) {
|
|
3473
|
-
if (timezone === void 0) {
|
|
3474
|
-
timezone = "UTC";
|
|
3475
|
-
}
|
|
3476
3473
|
if (!time) return null;
|
|
3477
3474
|
if (time.split(":").length !== 3) return null;
|
|
3475
|
+
if (!timezone) {
|
|
3476
|
+
var totalSeconds = +time.split(":")[0] * 60 * 60 + +time.split(":")[1] * 60 + +time.split(":")[2];
|
|
3477
|
+
var startOfDay = moment$1.utc().startOf("day");
|
|
3478
|
+
var _dateTime = startOfDay.add(totalSeconds, "seconds");
|
|
3479
|
+
return _dateTime.local();
|
|
3480
|
+
}
|
|
3478
3481
|
var dateTime;
|
|
3479
3482
|
var isOffset = /^(UTC|GMT)?[+-]/.test(timezone);
|
|
3480
3483
|
if (isOffset) {
|
|
3481
|
-
dateTime = moment$1.utc(time, "HH:mm:ss").utcOffset(timezone);
|
|
3484
|
+
dateTime = moment$1.utc(time, "HH:mm:ss").utcOffset(timezone, true);
|
|
3482
3485
|
} else {
|
|
3483
3486
|
dateTime = moment$1.tz(time, "HH:mm:ss", timezone);
|
|
3484
3487
|
}
|
|
3485
|
-
|
|
3488
|
+
console.log("run time", dateTime.format("HH:mm:ss"), timezone);
|
|
3489
|
+
return dateTime;
|
|
3486
3490
|
});
|
|
3487
3491
|
|
|
3488
3492
|
var historyCore = history.createBrowserHistory();
|