title: firestore 1.0 not returning Firestore timestamp
body: <p>Before, my code was working well and returning <code>Long</code> value for timestamp from firestore. Since the release of firestore 1.0, the code is returning <code>[object Object]</code> as the result. Though it saves the timestamp as <code>June 5, 2018 at 10:38:44 AM UTC+3</code>meaning it is not currently saved as a <code>long</code> value in the firestore database. I have tried some possible solutions from last night but not working. Is there any solution?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>exports.get_time = functions.https.onRequest((request, response) =&gt; {
      // if (!request.headers.authorization) {
      //     console.error('No Firebase ID token was passed');
      //     response.status(403).send('Unauthorized');
      //     return;
      // }
      var fieldValue = require("firebase-admin").firestore.FieldValue;
      db.collection('times').doc('servertime').set({servertime: fieldValue.serverTimestamp()}).then((ref) =&gt; {
          db.collection('times').doc('servertime').get().then((snapshot) =&gt; {
              response.writeHead(200, {"Content-Type": "text/plain"});
              response.write(String(snapshot.data()));
              response.end();
              return null;
          }).catch((error) =&gt; {
              response.writeHead(404, {"Content-Type": "text/plain"});
              response.write("Error\n" + error);
              response.end();
          });
          return null;
      }).catch((error) =&gt; {
          response.writeHead(404, {"Content-Type": "text/plain"});
          response.write("Error\n" + error);
          response.end();
      });
  });</code></pre>
  </div>
  </div>
  </p>