JavaScript getUTCSeconds()Method
Example
Return the seconds of a time according to universal time:
var d = new Date();
var n = d.getUTCSeconds();
var n = d.getUTCSeconds();
Try it Yourself »
Definition and Usage
The getUTCSeconds() method returns the seconds of a time according to universal time (0~59).
Coordinated Universal Time (UTC) is a time measurement system based on the length of an atomic second, keeping as close as possible to universal time.
Tip:Coordinated Universal Time, also known as World Unified Time, World Standard Time, International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).
Note:UTC time is the same as GMT (Greenwich) time.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the getUTCSeconds() method
Syntax
Date.getUTCSeconds()
Return Value
| Type | Description |
|---|---|
| Number | Returns its seconds field, which is an integer between 0 and 59. |
Technical Details
| JavaScript Version: | 1.3 |
|---|
More Examples
Display the current UTC time
How to use getUTCHours(), getUTCMinutes(), and getUTCSeconds() to display the current UTC time.
Other Extensions
JavaScript Date Object