Skip to content

timezone lacks dst attribute #18

Closed
@bablokb

Description

@bablokb

The timezone class lacks an attribute for dst (should also be in the constructor):

Adafruit CircuitPython 7.3.0-beta.1 on 2022-04-07; Pimoroni Badger 2040 with rp2040
>>> import adafruit_datetime
>>> import rtc
>>> r = rtc.RTC()
>>> dt =addafruit_datetime.datetime(r.datetime.tm_year,r.datetime.tm_mon,r.datetime.tm_mday,r.datetime.tm_hour,r.datetime.tm_min,r.datetime.tm_sec,0,adafruit_datetime.timezone.utc)
>>> dt.ctime()
'Wed Jan  1 00:01:43 2020'
>>> dt.timetuple()
Zurückverfolgung (jüngste Aufforderung zuletzt):
  Datei "<stdin>", Zeile 1, in <module>
  Datei "adafruit_datetime.py", Zeile 1485, in timetuple
  Datei "adafruit_datetime.py", Zeile 1479, in dst
AttributeError: 'timezone' Objekt hat kein Attribut 'dst'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions