-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add endtime to event model #49
Comments
I'm aware of this issue, and this is certainly a clear way to fix it but would require quite a lot of work to get done. If we were to implement this, we'd do it in together with the other changes suggested in ActivityWatch/activitywatch#109 |
There might be a way to do this for the SQLite datastore by either using a view or something else that computes |
We currently have an issue when fetching events by starttime and endtime.
If we have a case like this and we have an event which starts before 00:00 and ends after 00:00, if we query with startime=the_second_day we will not get the event even though it is within the second day.
Currently we are checking the datetimes like this
What we actually should do when fetching events with a starttime and endtime
This would however require us to add a "endtime" field to save in every datastore.
At that point we could also remove the duration field since it's essentially endtime-starttime to save on db size.
TL;DR: Our datastorages cannot filter by starttime+duration to get the endtime, we need an actual endtime field instead of duration to be able to filter after endtime and fix a few quirks when having events in between two dates.
The text was updated successfully, but these errors were encountered: