YouTip LogoYouTip

Jsref Setutcmilliseconds

# JavaScript setUTCMilliseconds() Method [![Image 8: Date Object Reference](#) JavaScript Date Object](#) ## Example Set the milliseconds to 192 according to Coordinated Universal Time (UTC): var d = new Date(); d.setUTCMilliseconds(192); var n = d.getUTCMilliseconds(); _n_ output: 192 [Try it yourself Β»](#) * * * ## Definition and Usage The setUTCMilliseconds() method is used to set the milliseconds of a specified time according to Coordinated Universal Time (UTC). **Note:** Coordinated Universal Time, also known as Universal Time, World Standard Time, International Coordinated Time, abbreviated as UTC (Universal Coordinated Time). **Note:** UTC time is the same as GMT (Greenwich Mean Time). * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the setUTCMilliseconds() method. * * * ## Syntax _Date_.setUTCMilliseconds(_millisec_) ## Parameter Values | Parameter | Description | | :--- | :--- | | _millisec_ | Required. The value to set the milliseconds field of the dateObject to. Expressed in Coordinated Universal Time (UTC). This parameter is an integer between 0 and 999: * -1 is the last millisecond of the previous second * 1000 is the first millisecond of the next second * 1001 is the second millisecond of the next second | ## Return Value | Type | Description | | --- | --- | | Number | Returns the number of milliseconds between midnight, January 1, 1970, and the time set with the specified milliseconds. | ## Technical Details | JavaScript Version: | 1.3 | | --- | * * JavaScript Date Object](#)
← Jsref Sqrt1 2Jsref Setutchours β†’