Stay organized with collections
Save and categorize content based on your preferences.
Properties
Optional serverTimestamps
serverTimestamps: "estimate" | "previous" | "none"
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/js/v8/firebase).\n- [firestore](/docs/reference/js/v8/firebase.firestore).\n- SnapshotOptions \nOptions that configure how data is retrieved from a `DocumentSnapshot`\n(e.g. the desired behavior for server timestamps that have not yet been set\nto their final value).\n\nIndex\n\nProperties\n\n- [serverTimestamps](/docs/reference/js/v8/firebase.firestore.SnapshotOptions#servertimestamps)\n\nProperties\n\nOptional serverTimestamps \nserverTimestamps: \"estimate\" \\| \"previous\" \\| \"none\" \nIf set, controls the return value for server timestamps that have not yet\nbeen set to their final value.\n\nBy specifying 'estimate', pending server timestamps return an estimate\nbased on the local clock. This estimate will differ from the final value\nand cause these values to change once the server result becomes available.\n\nBy specifying 'previous', pending timestamps will be ignored and return\ntheir previous value instead.\n\nIf omitted or set to 'none', `null` will be returned by default until the\nserver value becomes available."]]
Options that configure how data is retrieved from a
DocumentSnapshot
(e.g. the desired behavior for server timestamps that have not yet been set to their final value).