Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function dateToTimestamp(date: Date): Timestamp {
return timestampFactory(
date
.toISOString()
.split('.')[0]
.split('T')
.join(' '),
);
}