title: Express Session expire time and date are being set wrong
body: <p>I have an express session where the maxAge is set to for 1 hour from current time.</p>
  <pre><code>app.use(
    session({
      secret: 'ASecretValue',
      saveUninitialized: false,
      resave: false,
      cookie: { secure },
      proxy: true,
      path: '/',
      maxAge: new Date(Date.now() + 3600000),
      store: MongoStore.create({ mongoUrl: MONGO_URL }),
    }),
  );
  </code></pre>
  <p>However when I check in MongoDB, the expire date is set to 2 weeks from current date.</p>
  <pre><code>_id:&quot;Nm7x9y55z7VZ2e7v_d6PrWlj7EdJKseW&quot;
  expires:2021-07-11T13:07:54.446+00:00
  session:&quot;{&quot;cookie&quot;:{&quot;originalMaxAge&quot;:null,&quot;expires&quot;:null,&quot;secure&quot;:false,&quot;httpOn...&quot;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/9PqM3.png" rel="nofollow noreferrer">Link to Image</a></p>