-
Notifications
You must be signed in to change notification settings - Fork 17
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
timezone of completed tasks not taken into account #117
Comments
@mikez per our discussion, adding your proposed solution here: Currently:
The database itself stores these dates as UTC. Suggested ChangesMake both responses and queries be in localtime. What do you think? To do so, tweak these functions in database.py of things.py:
Want to give it a shot? Hopefully, these should be easy edits and not involve much more than adding "localtime" to the SQL-query, i.e., |
LGTM; if easy, maybe want to add some tests? https://github.com/thingsapi/things.py/blob/main/tests/test_things.py /cc @AlexanderWillner in case you want to guide on tests or have thoughts on this. |
@mikez @AlexanderWillner A few questions on this:
|
@chrisgurney You can set the
Updating the database is the way @AlexanderWillner has done tests in the past. |
I used the |
@chrisgurney Checking in where you're at with this and if you still have unanswered questions? |
@chrisgurney Checking in again. Happy to help out here, let me know... :) |
To Reproduce
I was looking for all tasks completed on 2024-02-25:
...but it returns some tasks on the day before, particularly those that were completed close to midnight:
Here's the stopDate for one of the returned tasks: 1708826542.13277
Expected behavior
When I supply a
stop_date
I expect it to be reflective of my local timezone: i.e., get all tasks completed on that day for me.The text was updated successfully, but these errors were encountered: