<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
var date = new Date(Date.parse("2017-5-24 10:44:22")); //May 24 2017 10:44:22 GMT+0800 (中国标准时间)
console.log(date);
//上面的简写
var date = new Date("2017-5-24 10:44:22"); //May 24 2017 10:44:22 GMT+0800 (中国标准时间)
console.log(date);
var date = new Date(Date.UTC(2017, 4, 24, 10, 44, 22)); //May 24 2017 18:44:22 GMT+0800 (中国标准时间)
console.log(date); //本地时间+8小时
var date = new Date(2017, 4, 24, 10, 44, 22); //May 24 2017 10:44:22 GMT+0800 (中国标准时间)
console.log(date);
</script>
</head>
<body>
</body>
</html>