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

fix(dateHandling): trouble with dates from appointment #16

Closed
stenjo opened this issue Nov 7, 2023 · 0 comments · Fixed by #17
Closed

fix(dateHandling): trouble with dates from appointment #16

stenjo opened this issue Nov 7, 2023 · 0 comments · Fixed by #17

Comments

@stenjo
Copy link
Owner

stenjo commented Nov 7, 2023

Handling offset datetimes still a problem. Today seems to be handled, but when the appointment record only has a date, we're getting problems:

None
Version:  1.2.1
Created device
dt:     2023-11-09 13:15:00+01:00
today:  2023-11-07 18:24:49.454196+00:00
dt:     2023-11-11 00:00:00
today:  2023-11-07 18:24:49.454196+00:00
Traceback (most recent call last):
  File "/home/pi/Middager/middag.py", line 114, in <module>
    main(sys.argv[1:])
  File "/home/pi/Middager/middag.py", line 109, in main
    msg = dayText(event)
  File "/home/pi/Middager/dateHandling.py", line 21, in dayText
    delta = dt - today
TypeError: can't subtract offset-naive and offset-aware datetimes

@stenjo stenjo linked a pull request Nov 7, 2023 that will close this issue
@stenjo stenjo closed this as completed in #17 Nov 7, 2023
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