PEP 495: Added 'Aware datetime instances' subsection.

This commit is contained in:
Alexander Belopolsky 2015-08-30 22:01:40 -04:00
parent d8b976eb72
commit acc385bc72
1 changed files with 15 additions and 0 deletions

View File

@ -263,6 +263,21 @@ For example, on a system set to US/Eastern timezone::
1425796200.0
Aware datetime instances
........................
Users of pre-PEP implementations of ``tzinfo`` will not see any
changes in the behavior of their aware datetime instances. Two such
instances that differ only by the value of the ``fold`` attribute will
not be distinguishable by any means other than an explicit access to
the ``fold`` value.
On the other hand, if object's ``tzinfo`` is set to a fold-aware
implementation, then the value of ``fold`` will affect the result of
several methods but only if the corresponding time is in a fold or in
a gap: ``utcoffset()``, ``dst()``, ``tzname()``, and ``timetuple()``.
Combining and splitting date and time
.....................................