@clonegod/ttd-core 3.1.53 → 3.1.55
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -522,12 +522,12 @@ exports.DATE_TIME_FORMAT_DEFAULT = 'YYYY-MM-DD HH:mm:ss SSS';
|
|
|
522
522
|
exports.DATE_TIME_FORMAT_NO_WHITESPACE = 'YYYY_MM_DD_HH_mm_ss';
|
|
523
523
|
function getCurDateTime(format = '') {
|
|
524
524
|
if (format) {
|
|
525
|
-
return
|
|
525
|
+
return moment_1.default.utc().format(format);
|
|
526
526
|
}
|
|
527
|
-
return
|
|
527
|
+
return moment_1.default.utc().format(exports.DATE_TIME_FORMAT_DEFAULT);
|
|
528
528
|
}
|
|
529
529
|
function getCurTimeShort() {
|
|
530
|
-
return
|
|
530
|
+
return moment_1.default.utc().format('HH:mm:ss SSS');
|
|
531
531
|
}
|
|
532
532
|
function parseToDateTime(milliseconds, format = exports.DATE_TIME_FORMAT_DEFAULT) {
|
|
533
533
|
return moment_1.default.utc(milliseconds).format(format);
|
|
@@ -544,7 +544,7 @@ function sleep(mills) {
|
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
function parseDateTimeStrToMills(date_time_str, format = exports.DATE_TIME_FORMAT_DEFAULT) {
|
|
547
|
-
return
|
|
547
|
+
return moment_1.default.utc(date_time_str, format, true).valueOf();
|
|
548
548
|
}
|
|
549
549
|
const uuid = () => {
|
|
550
550
|
return short.generate();
|