mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
correct signature for tzinfo.dst() in examples; thanks to Daniil Shved from docs@
This commit is contained in:
parent
316f573d9c
commit
4bfe03a42e
1 changed files with 2 additions and 2 deletions
|
@ -1422,13 +1422,13 @@ methods. Exactly which methods are needed depends on the uses made of aware
|
||||||
|
|
||||||
Most implementations of :meth:`dst` will probably look like one of these two::
|
Most implementations of :meth:`dst` will probably look like one of these two::
|
||||||
|
|
||||||
def dst(self):
|
def dst(self, dt):
|
||||||
# a fixed-offset class: doesn't account for DST
|
# a fixed-offset class: doesn't account for DST
|
||||||
return timedelta(0)
|
return timedelta(0)
|
||||||
|
|
||||||
or ::
|
or ::
|
||||||
|
|
||||||
def dst(self):
|
def dst(self, dt):
|
||||||
# Code to set dston and dstoff to the time zone's DST
|
# Code to set dston and dstoff to the time zone's DST
|
||||||
# transition times based on the input dt.year, and expressed
|
# transition times based on the input dt.year, and expressed
|
||||||
# in standard local time. Then
|
# in standard local time. Then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue