code: function getTimeStamp() {
          var time = new Date();
          var timestamp = time.getFullYear() + "-" +
              ("0" + (time.getMonth() + 1)).slice(-2) + "-" +
              ("0" + time.getDate()).slice(-2) + ' ' +
              ("0" + time.getHours()).slice(-2) + ":" +
              ("0" + time.getMinutes()).slice(-2) + ":" +
              ("0" + time.getSeconds()).slice(-2);
          return timestamp;
      }
docs: get timestamp