Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var dateString = 'Tue Sep 18 14:42:56 SGT 2018';
var pieces = dateString.split(" ");
// 2018 18 Sep 14:42:56
var date = new Date(pieces[5]+" "+pieces[2]+" "+pieces[1]+" "+pieces[3]); // 2018 1 Sep
date.setHours(date.getHours()-8); // SGT to UTC
console.log("Milliseconds: " + date.getTime());
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
amomsenpro
0viewers