A JavaScriptDate object stores a number that is to interpreted as milliseconds after (or before, if this number is negative) January 1st, 1970, UTC. Thus, this number is different from Unix time (which is a number that is to be interpreted as seconds from January 1st, 1970).
constructor
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>Data constructor</title>
<script type="text/javascript">
function main() {
var out = document.getElementById('out')
var months_are_zero_based = 1; // 1 = February!!!!
var dt = new Date (2014, months_are_zero_based, 20, 9, 17, 22);
out.innerHTML = dt.toString() + "<br>"; // Thu Feb 20 2014 09:17:22 GMT+0100
dt = new Date ('2014-08-28')
out.innerHTML += dt.toString() + "<br>"; // Thu Aug 28 2014 02:00:00 GMT+0200
}
</script>
</head>
<body onload='main();'>
<div id='out'>
</div>
</body>
</html>