Date.setUTCSeconds

setUTCSeconds – Set the seconds, according to universal time (0–59).

Description

Date.setUTCSeconds(integer seconds)

Parameters

Name Description Type Default Optional
seconds integer No

Return values

Integer. The new timestamp.

Examples

Example #1 – setUTCSeconds example
var date = new Date(Date.UTC(2015, 9, 21, 16, 29, 00)); console.log(date.getTime()); // 1445444940000 console.log(date.setUTCSeconds(10)); // 1445444950000

External references