title: Cookie expiry date being ignored in Express 4.13.4 when using moment.toDate()
body: <p>I'm trying to set a cookie with a specific expiry date of 3 months. I can set the cookie fine but the expiry set for it isn't working. </p>
  
  <p>I've used momentJS to create a date object at the time I want. The correct time is being outputted from the console but the cookie doesn't have the right value, it's value is to expire in a couple minutes instead of the 3 months from the date.</p>
  
  <pre><code>// Create the date the cookies will expire on
  var cookieDate = moment().add(6, 'months').toDate();
  console.log(cookieDate);
  res.cookie('username', user.username, { expires: cookieDate });
  </code></pre>
  
  <p>I looked through the docs and it just asks for a Date object to be passed to it. </p>
  
  <p>I also looked around on stackoverflow and the only thing I could find was <a href="https://stackoverflow.com/questions/14176432/">this</a> which tells the OP to use req.session.cookie which just doesn't seem right as you should be setting a cookie on response to the client and not in a session.</p>