JavaScript toUTCString() Method
Example
Converts a Date object to a string based on Coordinated Universal Time (UTC):
var d=new Date();
var n=d.toUTCString();
n Output result:
Try it »
Definition and Usage
The toUTCString() method converts a Date object to a string based on Coordinated Universal Time (UTC) and returns the result.
**Tip:** Coordinated Universal Time, also known as Universal Time, Universal Standard Time, or International Coordinated Time, abbreviated as UTC. It comes from the English "Coordinated Universal Time" / French "Temps Universel Coordonne".
**Note:** UTC time is the same as GMT (Greenwich) time.
Browser support





All major browsers support the toUTCString() method
Syntax
Date
.toUTCString()
Return Value
| Type | Description |
|---|---|
| String | A string representation of a Date object, expressed in Coordinated Universal Time (UTC). |
Technical Details
| JavaScript version: | 1.3 |
|---|
JavaScript Date object