PEP 495: Added 'Aware datetime instances' subsection.
This commit is contained in:
parent
d8b976eb72
commit
acc385bc72
15
pep-0495.txt
15
pep-0495.txt
|
@ -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
|
||||
.....................................
|
||||
|
||||
|
|
Loading…
Reference in New Issue