Skip to content

Commit d1269ec

Browse files
authored
Merge pull request #20 from tekktrik/fix/fix-dst-error
Create timezone.dst() with return None for timetuple() fix
2 parents c0edf52 + c042ff1 commit d1269ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adafruit_datetime.py

+7
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,13 @@ def tzname(self, dt: "datetime") -> str:
609609
"""Return the time zone name corresponding to the datetime object dt, as a string."""
610610
raise NotImplementedError("tzinfo subclass must override tzname()")
611611

612+
def dst(self, dt: "datetime") -> None: # pylint: disable=unused-argument
613+
"""Return the DST setting correspinding to the datetime object dt, as a number.
614+
615+
DST usage is currently not implemented for this library.
616+
"""
617+
return None
618+
612619
# tzinfo is an abstract base class, disabling for self._offset
613620
# pylint: disable=no-member
614621
def fromutc(self, dt: "datetime") -> "datetime":

0 commit comments

Comments
 (0)