From: Sergey Matveev Date: Mon, 30 Aug 2021 16:09:50 +0000 (+0300) Subject: Add missing totzdatetime documentation references X-Git-Tag: 9.1~2 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=117a086ca45361b752f9c92f12bf9d159fa15008 Add missing totzdatetime documentation references --- diff --git a/doc/install.rst b/doc/install.rst index 286e64e..db2ccf2 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -12,8 +12,9 @@ signature from `official website `__:: $ python setup.py install # or copy pyderasn.py (possibly termcolor.py) to your PYTHONPATH -``termcolor`` is an optional dependency used for output colourizing. -``urwid`` is an optional dependency used for :ref:`interactive browser `. +* ``termcolor`` is an optional dependency used for output colourizing. +* ``urwid`` is an optional dependency used for :ref:`interactive browser `. +* ``dateutil`` is an optional dependency used for ``.totzdatetime()`` method. You could use pip (**no** OpenPGP authentication is performed!) with PyPI:: diff --git a/doc/news.rst b/doc/news.rst index d0a3d25..0d5d6ea 100644 --- a/doc/news.rst +++ b/doc/news.rst @@ -1,6 +1,14 @@ News ==== +.. _release9.1: + +9.1 +--- +* ``.totzdatetime()`` appeared in UTCTime and GeneralizedTime, + explicitly setting UTC timezone information. + Optional ``dateutils.tz`` library is required for that + .. _release9.0: 9.0 diff --git a/pyderasn.py b/pyderasn.py index 7178d81..3eb1071 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -971,12 +971,12 @@ _____________ UTCTime _______ .. autoclass:: pyderasn.UTCTime - :members: __init__, todatetime + :members: __init__, todatetime, totzdatetime GeneralizedTime _______________ .. autoclass:: pyderasn.GeneralizedTime - :members: __init__, todatetime + :members: __init__, todatetime, totzdatetime Special types ------------- @@ -5038,6 +5038,8 @@ class UTCTime(VisibleString): datetime.datetime(2017, 9, 30, 22, 7, 50) >>> UTCTime(datetime(2057, 9, 30, 22, 7, 50)).todatetime() datetime.datetime(1957, 9, 30, 22, 7, 50) + >>> UTCTime(datetime(2057, 9, 30, 22, 7, 50)).totzdatetime() + datetime.datetime(1957, 9, 30, 22, 7, 50, tzinfo=tzutc()) If BER encoded value was met, then ``ber_raw`` attribute will hold its raw representation.