Skip to content
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

Fixed incorrect type definition for tz_offset parameter. #30

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

joshua-beck-0908
Copy link
Contributor

Fixed a bug where tz_offset is declared as an int instead of a float in contrast with the docstring.
This bug made it impossible to get the correct local time for those using a timezone not aligned to a whole hour.

Copy link

@Neradoc Neradoc left a comment

Choose a reason for hiding this comment

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

Thanks 👍
Tested the change locally (in both CP and desktop).
This fixes using a float as input (which would otherwise cause a loss of precision and incorrect time).
Fixes #29

@jepler jepler merged commit a87669f into adafruit:main Jul 3, 2023
@joshua-beck-0908 joshua-beck-0908 deleted the timezone_fix branch July 3, 2023 14:52
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 18, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_FocalTouch to 1.4.9 from 1.4.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_FocalTouch#26 from adafruit/ladyada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX9744 to 1.2.15 from 1.2.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX9744#17 from kbsriram/add-typing

Updating https://github.com/adafruit/Adafruit_CircuitPython_Nunchuk to 1.1.9 from 1.1.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_Nunchuk#31 from adafruit/stemma_i2c

Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.12.0 from 3.11.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#114 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.14.0 from 1.13.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#118 from ladyada/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_asyncio to 0.5.23 from 0.5.22:
  > Merge pull request adafruit/Adafruit_CircuitPython_asyncio#44 from furbrain/main
  > Merge pull request adafruit/Adafruit_CircuitPython_asyncio#42 from tekktrik/dev/fix-build-bundle

Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 4.1.0 from 4.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#59 from FoamyGuy/ethernet_example
  > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#58 from michalpokusa/server-headers

Updating https://github.com/adafruit/Adafruit_CircuitPython_NTP to 3.0.10 from 3.0.9:
  > Merge pull request adafruit/Adafruit_CircuitPython_NTP#30 from joshua-beck-0908/timezone_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_PortalBase to 1.14.9 from 1.14.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_PortalBase#92 from makermelissa/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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.

None yet

3 participants