title: Can't set cookie 'expires' or 'maxAge' in Node.js using Express 3.0
body: <p>I've been trying to set my cookie's expiry date in Node.js using Express 3.0, but nothing is working.</p>
  
  <p>My first attempt:</p>
  
  <pre><code>res.cookie('user', user, { maxAge: 9000, httpOnly: true });
  </code></pre>
  
  <p>Just ends in a cookie that has an invalid expiry time according to Chrome.
  Then I tried to set 'expires' instead, like so:</p>
  
  <pre><code>res.cookie('user', user, { expires: new Date(new Date().getTime()+5*60*1000), httpOnly: true });
  </code></pre>
  
  <p>And now my cookie is just a session cookie.</p>
  
  <p>Does anyone know how to fix this?</p>