Date – getUTCSeconds()
date.getUTCSeconds()
getUTCSeconds()
returns the seconds of this date
object, according to universal time.
Examples
1. Get the seconds from current date according to universal time.
let date = new Date();
console.log(date);
console.log(date.getUTCSeconds());