Javascript Reference - JavaScript getUTCSeconds() Method








getUTCSeconds()
Returns the UTC date's seconds as a number between 0 and 59.

UTC time is the same as GMT time.

Browser Support

getUTCSeconds() Yes Yes Yes Yes Yes

Syntax

dateObject.getUTCSeconds();

Parameters

None.

Return Value

return a number, from 0-59, representing the seconds.





Example


var myDate = new Date();
console.log(myDate.getUTCSeconds());

The code above generates the following result.