title: MongoDB TTL expiry doesn't work properly on NodeJS
body: <p>I'm using MongoDB (v3.4) as a cache and using TTL indexes to expire records. However, the TTL settings don't seem to work properly. Specifically, I tested using an endpoint to insert data (as below). </p>
  
  <p>The endpoint mongoInsert is supposed to expire in 5 min. However, it seems that after ~1 min, the document got removed. I've looked up other similar suggestions regarding the use of UTC time using moment().utc().toDate(), and the behaviour was the same. new Date() returned UTC time so I guess it should be the same effect.</p>
  
  <p>Not sure if there are other settings that should be included but are not detailed in the documentation. Anyone encountered this before?</p>
  
  <pre><code>function mongoInsert(mongoClient){
      return function(req, res){
          mongoClient.connect('mongodb://localhost:27017/cache', function(err, db) {
              db.collection('data', function(err, collection){
                  var testItems = [{
                      "_id": "abc12345",
                      "dmac": "abc",
                      "createdAt": new Date(),
                      "val": {
                          "0": 10,
                          "1": 15,
                          "2": 5
                      },
                      "res": "minutes",
                      "time": "2017-12-04T00:12:58Z"
                  }];
                  let unix = new moment().valueOf();
                  collection.createIndex({createdAt: unix}, {expireAfterSeconds: 300});
                  collection.insertMany(testItems, function(err, items){
                      db.close();
                      res.json(items);
                  });
              })
          })
      }
  }
  </code></pre>