toUTCString()方法使用根据世界时返回 1970 年 1 月 1 日 到指定日期的毫秒数。
toUTCString() - 语法
Date.toUTCString ()
toUTCString() - 返回值
使用通用时间约定将转换后的日期返回为字符串。
toUTCString() - 示例
var dateobject=new Date(1993, 6, 28, 14, 39, 7); console.log( dateobject.toUTCString() );
运行上面代码输出
Wed, 28 Jul 1993 09:09:07 GMT