Skip to content

Create timezone.dst() with return None for timetuple() fix #20

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

Merged
merged 1 commit into from
Aug 14, 2022
Merged

Create timezone.dst() with return None for timetuple() fix #20

merged 1 commit into from
Aug 14, 2022

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
Updating https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3741 to 1.3.4 from 1.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_IS31FL3741#19 from tekktrik/dev/use-protocol-typing

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.19 from 1.1.18:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3MDL#21 from tekktrik/dev/add-typing

Updating https://github.com/adafruit/Adafruit_CircuitPython_datetime to 1.2.0 from 1.1.10:
  > Merge pull request adafruit/Adafruit_CircuitPython_datetime#20 from tekktrik/fix/fix-dst-error

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes to 2.5.3 from 2.5.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#53 from bablokb/sparkline_opt2
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