feat: 为文章发布时间添加精确到秒的时间戳

修改文章发布时间格式,从仅日期改为包含时分秒的完整时间戳
更新文章排序逻辑和新建文章脚本以支持精确时间排序
This commit is contained in:
afoim
2025-08-10 17:57:57 +08:00
parent c75f6df9ed
commit e8a3b0a9f4
4 changed files with 7 additions and 4 deletions

View File

@@ -8,8 +8,11 @@ function getDate() {
const year = today.getFullYear()
const month = String(today.getMonth() + 1).padStart(2, "0")
const day = String(today.getDate()).padStart(2, "0")
const hours = String(today.getHours()).padStart(2, "0")
const minutes = String(today.getMinutes()).padStart(2, "0")
const seconds = String(today.getSeconds()).padStart(2, "0")
return `${year}-${month}-${day}`
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`
}
const args = process.argv.slice(2)