Skip to content

Conversation

@tekktrik
Copy link
Member

@tekktrik tekktrik commented Jul 13, 2022

Fixes #18, which was failing because timezone didn't have a default dst() to use if a timezone was provided. New behavior based on issue test code:

>>> import adafruit_datetime
>>> dt = adafruit_datetime.datetime(2022, 7, 13,  13, 30, 15 , 0, adafruit_datetime.timezone.utc)
>>> dt.ctime()
'Wed Jul 13 13:30:15 2022'
>>> dt.timetuple()
time.struct_time(tm_year=2022, tm_mon=7, tm_mday=13, tm_hour=13, tm_min=30, tm_sec=15, tm_wday=2, tm_yday=194, tm_isdst=-1)

@tekktrik tekktrik requested a review from a team July 13, 2022 16:21
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Tested successfully with Feather TFT.
Thanks for the fix @tekktrik

@FoamyGuy FoamyGuy merged commit d1269ec into adafruit:main Aug 14, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 15, 2022
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 this pull request may close these issues.

timezone lacks dst attribute

2 participants