function getDateTimeString() { const now = new Date() const year = now.getFullYear(); const month = now.getMonth() + 1; const day = now.getDay(); const hours = now.getHours(); const minutes = now.getMinutes(); const seconds = now.getSeconds(); return [year, month, day, hours, minutes, seconds].map((num) => { if (num < 10) { return '0' + num; } return num; }).join('') }