Skip to content

DOCSP-14117 Timezone datafile update #5743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions source/includes/fact-timeZoneInfo.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
The full path from which to load the time zone database. If this option
is not provided, then MongoDB will use its built-in time zone database.

The configuration file included with Linux and macOS packages sets the time
zone database path to ``/usr/share/zoneinfo`` by default.
The configuration file included with Linux and macOS packages sets the
time zone database path to ``/usr/share/zoneinfo`` by default.

The built-in time zone database is a copy of the `Olson/IANA time zone
database <https://www.iana.org/time-zones>`_. It is updated along with MongoDB
releases, but the release cycle of the time zone database differs from the
release cycle of MongoDB. A copy of the most recent release of the time zone
database can be downloaded from
https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip.
database <https://www.iana.org/time-zones>`_. It is updated along with
MongoDB releases, but the time zone database release cycle
differs from the MongoDB release cycle. The most recent release of
the time zone database is available on our `download site
<https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip>`_.

13 changes: 13 additions & 0 deletions source/includes/warning-timeZoneInfo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. warning::

MongoDB uses the third party `timelib
<https://github.com/derickr/timelib>`_ library to provide accurate
conversions between timezones. Due to a recent update, ``timelib``
could create inaccurate time zone conversions in older versions of
MongoDB.

To explicitly link to the time zone database in versions of MongoDB
prior to 4.0.25, download the `time zone database
<https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip>`_.
and use the :option:`timeZoneInfo <mongod --timeZoneInfo>` parameter.

3 changes: 2 additions & 1 deletion source/reference/configuration-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ Core Options
*Type*: string

.. include:: /includes/fact-timeZoneInfo.rst


.. include:: /includes/warning-timeZoneInfo.rst


.. _free-monitoring-configuration-options:
Expand Down
7 changes: 5 additions & 2 deletions source/reference/program/mongod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,12 @@ Core Options
wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip
unzip timezonedb-latest.zip
mongod --timeZoneInfo timezonedb-2017b/

.. include:: /includes/warning-timeZoneInfo.rst

.. seealso::

.. seealso:: :setting:`processManagement.timeZoneInfo`.

:setting:`processManagement.timeZoneInfo`.


.. option:: --serviceExecutor <string>
Expand Down
3 changes: 1 addition & 2 deletions source/reference/program/mongos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ Core Options
consistent performance and use less resources when there are
more inactive connections than database requests.


.. option:: --timeZoneInfo <path>

.. include:: /includes/fact-timeZoneInfo.rst
Expand All @@ -550,8 +549,8 @@ Core Options
wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip
unzip timezonedb-latest.zip
mongos --timeZoneInfo timezonedb-2017b/


.. include:: /includes/warning-timeZoneInfo.rst

Sharded Cluster Options
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down