JavaScript Date toUTCString() method
- Previous Page toTimeString()
- Next Page UTC()
- Go Back to the Previous Level JavaScript Date Reference Manual
Definition and usage
toUTCString()
The method converts a Date object to a string based on UTC.
Tip:Coordinated Universal Time (UTC) is the time set by the world time standard.
Note:UTC time is the same as GMT time (Greenwich Mean Time).
Example
Convert a Date object to a string based on UTC:
var d = new Date(); var n = d.toUTCString();
Syntax
Date.toUTCString()
Parameter
No parameters.
Technical details
Return value: | String, represented as a string in UTC date and time. |
---|---|
JavaScript version: | ECMAScript 1 |
Browser support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
toUTCString() | Support | Support | Support | Support | Support |
- Previous Page toTimeString()
- Next Page UTC()
- Go Back to the Previous Level JavaScript Date Reference Manual