Skip to content

Commit 8f79543

Browse files
DOC: timezone warning for dates beyond TODAY (#34100)
* DOC: timezone warning for dates beyond TODAY introducing a suggestion discussed in PR #33863 : Added a warning in the user guide that timezone conversion on future dates is inherently unreliable. * shorter warning text Co-authored-by: Marco Gorelli <[email protected]>
1 parent db6414f commit 8f79543

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/source/user_guide/timeseries.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -2319,13 +2319,18 @@ you can use the ``tz_convert`` method.
23192319
Instead, the datetime needs to be localized using the ``localize`` method
23202320
on the ``pytz`` time zone object.
23212321

2322+
.. warning::
2323+
2324+
Be aware that for times in the future, correct conversion between time zones
2325+
(and UTC) cannot be guaranteed by any time zone library because a timezone's
2326+
offset from UTC may be changed by the respective government.
2327+
23222328
.. warning::
23232329

23242330
If you are using dates beyond 2038-01-18, due to current deficiencies
23252331
in the underlying libraries caused by the year 2038 problem, daylight saving time (DST) adjustments
23262332
to timezone aware dates will not be applied. If and when the underlying libraries are fixed,
2327-
the DST transitions will be applied. It should be noted though, that time zone data for far future time zones
2328-
are likely to be inaccurate, as they are simple extrapolations of the current set of (regularly revised) rules.
2333+
the DST transitions will be applied.
23292334

23302335
For example, for two dates that are in British Summer Time (and so would normally be GMT+1), both the following asserts evaluate as true:
23312336

0 commit comments

Comments
 (0)