@o861runners/nmp 1.260130.11453 → 1.260130.12200
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/package.json +1 -1
- package/src/core/publisher.js +12 -5
package/package.json
CHANGED
package/src/core/publisher.js
CHANGED
|
@@ -68,13 +68,20 @@ export class Publisher {
|
|
|
68
68
|
* - 15/12/2026 09:30 → "1.26.1215.10930"
|
|
69
69
|
*/
|
|
70
70
|
generateVersion() {
|
|
71
|
+
// Create a new Date object
|
|
71
72
|
const now = new Date();
|
|
72
|
-
const yy = String(now.getFullYear()).slice(-2);
|
|
73
|
-
const mm = String(now.getMonth() + 1).padStart(2, "0");
|
|
74
|
-
const dd = String(now.getDate()).padStart(2, "0");
|
|
75
|
-
const hh = String(now.getHours()).padStart(2, "0");
|
|
76
|
-
const MM = String(now.getMinutes()).padStart(2, "0");
|
|
77
73
|
|
|
74
|
+
// Adjust to Vietnam timezone (UTC+7)
|
|
75
|
+
const vietnamTime = new Date(now.toLocaleString("en-US", { timeZone: "Asia/Ho_Chi_Minh" }));
|
|
76
|
+
|
|
77
|
+
// Extract components: year, month, day, hour, minute
|
|
78
|
+
const yy = String(vietnamTime.getFullYear()).slice(-2);
|
|
79
|
+
const mm = String(vietnamTime.getMonth() + 1).padStart(2, "0");
|
|
80
|
+
const dd = String(vietnamTime.getDate()).padStart(2, "0");
|
|
81
|
+
const hh = String(vietnamTime.getHours()).padStart(2, "0");
|
|
82
|
+
const MM = String(vietnamTime.getMinutes()).padStart(2, "0");
|
|
83
|
+
|
|
84
|
+
// Return version string
|
|
78
85
|
return `1.${yy}${mm}${dd}.1${hh}${MM}`;
|
|
79
86
|
}
|
|
80
87
|
|