Do you really want local time? This is generally not a good idea as you will end up with all sorts of confusing calculations to deal with DST, timezones, etc. Normally, the best approach is to store timestamps as UTC rather than local. Then convert to local time when actually displaying.
To get the right format:
const date = new Date().toISOString().slice(0, 19).replace('T', ' ').replace('Z','');