English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript toUTCString() Method

 JavaScript Date Object

toUTCString()The method converts a date to a string using UTC time.

toUTCString()The returned value is a string whose format is similar toDate.toString()Same, but the timezone offset (UTC) is zero.

Syntax:

date.toUTCString()
var d = new Date();
var str = d.toUTCString();
Test and See‹/›

Browser Compatibility

All browsers fully support the toUTCString() method:

Method
toUTCString()YesYesYesYesYes

Technical Details

Return Value:String representation of dates using the UTC timezone
JavaScript Version:ECMAScript 1

 JavaScript Date Object