From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Date Object
The getUTCSeconds() method returns the seconds of a time according to the Universal Coordinated Time (UTC).
| dateObject.getUTCSeconds() |
Note: The value returned by getUTCSeconds() is a two digit number. However, the return value is not always two digits, if the value is less than 10 it only returns one digit.
Note: This method is always used in conjunction with a Date object.
Tip: The Universal Coordinated Time (UTC) is the time set by the World Time Standard.
Example 1Get the UTC seconds of the current time:
Try it yourself » |
Example 2Get the UTC seconds from a specific date and time:
Try it yourself » |
More Examples |
Display the current UTC time
How to use getUTCHours(), getUTCMinutes(), and getUTCSeconds() to display the current UTC time.
JavaScript Date Object
From http://www.w3schools.com (Copyright Refsnes Data)