Date.UTC()
JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, NES2+, IE 3+, Opera3+ Syntax
Date.UTC(year, month, day, hours, minutes, seconds, milliseconds)
Description
Since the Date constructor creates new dates in local time, the UTC() method is provided to create dates in universal time (GMT). The method accepts arguments to allow you to set all aspects of a date and time, from the year to milliseconds. An integer, representing the number of milliseconds between midnight January 1, 1970 (GMT) to the date and time specified, is returned from the method. The integer can then be used to create a new Date object. The arguments and return value are in Table 6.25.
Caution
The milliseconds returned from the method are incorrect in Navigator ...
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.