Fix single digit minutes & seconds

This commit is contained in:
QuickMythril 2025-01-14 21:28:41 -05:00
parent f10e0038f7
commit c77559392a

View File

@ -49,8 +49,8 @@ const timestampToHumanReadableDate = async(timestamp) => {
const month = date.getMonth() + 1
const year = date.getFullYear()
const hours = date.getHours()
const minutes = date.getMinutes()
const seconds = date.getSeconds()
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
const formattedDate = `${year}.${month}.${day}@${hours}:${minutes}:${seconds}`
console.log('Formatted date:', formattedDate)