🚚 稍微调整了下位置

This commit is contained in:
BTMuli
2023-11-02 17:10:34 +08:00
parent c55f5b9ab8
commit 38ef0bfcca
3 changed files with 18 additions and 24 deletions

View File

@@ -23,6 +23,23 @@ export function stamp2LastTime(time: number): string {
.padStart(2, "0")}:${second.toFixed(0).padStart(2, "0")}`;
}
/**
* @description 时间戳转换为日期
* @since Alpha v0.2.3
* @param {number} timestamp - 时间戳(毫秒)
* @returns {string} 日期 2021-01-01 00:00:00
*/
export function timestampToDate(timestamp: number): string {
return new Date(timestamp).toLocaleString("zh", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
});
}
/**
* @description 获取 deviceID
* @since Beta v0.3.4