我在Chrome的Console中这样输出日期:
console.log(new Date());
但是显示结果是这样的:Thu May 12 2016 22:47:25 GMT+0800 (ä¸å½æ åæ¶é´)
在IE中却又是正常的,括号中显示的是2016
,请问各位前辈这是什么原因导致的,又如何解决呢?
完整的代码:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<body>
<script>
console.log(new Date());
</script>
</body>
</html>
document.charset 可查看页面编码
我在向 localStorage 记录时间时,也遇到类似情况,记录时刻是:
我的 Chrome 可以自动更新。
根据 Chrome 官方信息 ,3月2日发布 V49,4月13日发布 v50.
结合上边记录的信息,在 Chrome 更新后恢复正常。
也许真的是 v49 的问题。
供参考。