-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The whenDeleted field in the blacklist table is currently mapped to use the date format DD-MM-YYYY HH:MM:SS (e.g., 31-3-2025 14:54:49). This format is causing issues with date conversion. The correct format should be YYYY-MM-DD HH:MM:SS (e.g., 2025-03-31 14:54:49).
Steps to Reproduce:
- Update the
whenDeletedfield with a date in the formatDD-MM-YYYY HH:MM:SS. - Observe the conversion error.
Proposed Solution:
Update the date format to YYYY-MM-DD HH:MM:SS. This can be accomplished using the following JavaScript code:
function convertDate(date) {
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
function getFormattedDate() {
const date = new Date();
return isNaN(date) ? "" : convertDate(date);
}
getFormattedDate();Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working