Skip to content

Commit

Permalink
Merge pull request #20 from tekktrik/fix/fix-dst-error
Browse files Browse the repository at this point in the history
Create timezone.dst() with return None for timetuple() fix
  • Loading branch information
FoamyGuy authored Aug 14, 2022
2 parents c0edf52 + c042ff1 commit d1269ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions adafruit_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,13 @@ def tzname(self, dt: "datetime") -> str:
"""Return the time zone name corresponding to the datetime object dt, as a string."""
raise NotImplementedError("tzinfo subclass must override tzname()")

def dst(self, dt: "datetime") -> None: # pylint: disable=unused-argument
"""Return the DST setting correspinding to the datetime object dt, as a number.
DST usage is currently not implemented for this library.
"""
return None

# tzinfo is an abstract base class, disabling for self._offset
# pylint: disable=no-member
def fromutc(self, dt: "datetime") -> "datetime":
Expand Down

0 comments on commit d1269ec

Please sign in to comment.