Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript getUTCSeconds() Method

JavaScript getUTCSeconds() Method

Date Object Reference JavaScript Date object

Example

Return the seconds of a time based on universal time:

var d = new Date();

var n = d.getUTCSeconds();

Try it »


Definition and Usage

The getUTCSeconds() method returns the seconds of a time (0 to 59) based on universal time.

Coordinated Universal Time (UTC) is a time measurement system based on the atomic second, designed to stay as close as possible to universal time.

**Tip:** Coordinated Universal Time, also known as Universal Time, World Standard Time, or International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).

**Note:** UTC time is the same as GMT (Greenwich) time.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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.


Date Object Reference JavaScript Date object