setUTCSeconds (JavaScript)
Sets the second in UTC. Optionally sets the millisecond.
Defined in
Date (Standard - JavaScript)Syntax
setUTCSeconds(sec:int)
: long
Parameters | Description |
---|---|
sec |
The second in UTC where the seconds in UTC are 0 through 59. |
ms |
The millisecond in UTC where the milliseconds in a second are 0 through 999. |
Return value | Description |
---|---|
long |
The new time in numeric format. |
Examples
This computed label sets the current time with the second and millisecond at 0.var date = new Date();
date.setUTCSeconds(0, 0);
date.toUTCString()