set date time to date time local in javascript code example
Example: Date object for local time and date
now.toLocaleString(undefined, {
day: 'numeric',
month: 'numeric',
year: 'numeric',
hour: '2-digit',
minute: '2-digit',
});