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

Filtering of date does not work as expected #471

Closed
MPSharp opened this issue Apr 3, 2024 · 1 comment · Fixed by #503
Closed

Filtering of date does not work as expected #471

MPSharp opened this issue Apr 3, 2024 · 1 comment · Fixed by #503
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MPSharp
Copy link

MPSharp commented Apr 3, 2024

Date filter not working

@MPSharp MPSharp added the bug Something isn't working label Apr 3, 2024
@MPSharp MPSharp added this to the RC1 Release milestone Apr 3, 2024
@evan-scales
Copy link
Collaborator

Start end end time are stored as UTC times in the db. So that first posts start time is 4/1/24 0:44 AM.

To fix this we need to add/subtract time here based on the users timezone. Since we are coming from EDT 4 hours should be added to this startAfterDateTime Something similar should probably be done for query.EndOnOrBeforeDate right below.

Or maybe if we pass a DateTime to the api instead of a DateOnly, then the DateTime can be localized already. So in our case it should be sending 4/1/24 04:00 AM UTC to the api for the start date

I think the filtering by time should be fine because we localize the time before sending it to the api.

@jbytes1027 jbytes1027 linked a pull request Apr 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants