diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index c82127dbdbe..06db4dd4a12 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -251,6 +251,10 @@ Glossary :term:`primary` on startup and in the event of a failure. See :ref:`replica-set-elections`. + unix epoch + January 1st, 1970 at 00:00:00 UTC. Commonly used in expressing time, + where the number of seconds or milliseconds since this point is counted. + eventual consistency A property of a distributed system that allows changes to the system to propagate gradually. In a database system, this means @@ -544,7 +548,7 @@ Glossary moving a document when it grows as the result of :method:`~db.collection.update()` operations. See :ref:`record-allocation-strategies`. - + padding factor An automatically-calibrated constant used to determine how much extra space MongoDB should allocate per document container on disk. diff --git a/source/reference/mongodb-extended-json.txt b/source/reference/mongodb-extended-json.txt index 4e43c841c21..f89ee3bab25 100644 --- a/source/reference/mongodb-extended-json.txt +++ b/source/reference/mongodb-extended-json.txt @@ -118,7 +118,7 @@ Date * - .. code-block:: none - { "$date": } + { "$date": "" } - @@ -126,8 +126,15 @@ Date new Date ( ) - ```` is the JSON representation of a 64-bit signed integer for - milliseconds since epoch UTC (unsigned before version 1.9.1). + In *Strict mode*, ```` is typically an ISO-8601 date format following + the template ``YYYY-MM-DDTHH:mm:ss.mmm<+/-Offset>``. When formatting + pre-:term:`unix epoch` dates, the format instead encodes as a string the + negative integer giving the number of milliseconds since epoch UTC: + + ``{ "$date" : { "$numberLong" : "" } }`` + + In *Shell mode*, ```` is the JSON representation of a 64-bit signed + integer giving the number of milliseconds since epoch UTC. Timestamp ~~~~~~~~~ @@ -368,5 +375,5 @@ NumberLong - .. code-block:: none NumberLong( ) - + Number long is a 64 bit signed integer. diff --git a/source/release-notes/2.6-compatibility.txt b/source/release-notes/2.6-compatibility.txt index e3935a8068b..68a3601e501 100644 --- a/source/release-notes/2.6-compatibility.txt +++ b/source/release-notes/2.6-compatibility.txt @@ -394,10 +394,8 @@ Timestamp Format Change ~~~~~~~~~~~~~~~~~~~~~~~ Description - Each message now starts with the timestamp formatted in - ``iso8601-local``, i.e. ``YYYY-MM-DDTHH:mm:ss.mmm<+/-Offset>``. For - example, ``2014-03-04T20:13:38.944-0500``. Previous versions used - ``ctime`` format. + Each message now starts with the timestamp format given in :ref:`2.6-time-format-changes`. + Previous versions used the ``ctime`` format. Solution MongoDB adds a new option :option:`--timeStampFormat` which supports @@ -902,6 +900,20 @@ Solution Update :data:`local.system.replset.members[n].votes` with values other than 1 or 0 to 1 or 0 as appropriate. +.. _2.6-time-format-changes: + +Time Format Changes +------------------- + +MongoDB now uses ``iso8601-local`` when formatting time for many output purposes. +This format follows the template ``YYYY-MM-DDTHH:mm:ss.mmm<+/-Offset>``. For +example, ``2014-03-04T20:13:38.944-0500``. + +This change impacts anything using +:doc:`Extended JSON ` in *Strict mode*, such as +:program:`mongoexport` and the :ecosystem:`REST and HTTP Interfaces +`. + .. _2.6-compatibility-other-resources: Other Resources