Skip to content

timezone lacks dst attribute #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bablokb opened this issue May 2, 2022 · 0 comments · Fixed by #20
Closed

timezone lacks dst attribute #18

bablokb opened this issue May 2, 2022 · 0 comments · Fixed by #20

Comments

@bablokb
Copy link

bablokb commented May 2, 2022

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant