Issue #2353
closedUTC must be used when filtering records by date fields
Description
I looked at the pulp documentation and there's no indication that I can't use non-UTC timezones when filtering by date fields (only that I must use iso8601):
https://docs.pulpproject.org/dev-guide/conventions/criteria.html#search-criteria
However, when I do a unit search with this filter:
{association: {created: {'$gt': '2016-10-19T16:30:31+06:00'}}}
I don't get back this repo_content_units record:
{ "_id" : ObjectId("58076855f4a0b6cf38a0a08e"), "repo_id" : "Default_Organization-Test-nosync", "unit_id" : "7356dfeb-a068-43d8-99e8-47a482c0f55c", "unit_type_id" : "rpm", "updated" : "2016-10-19T12:34:29Z", "created" : "2016-10-19T12:34:29Z" }
When I use UTC, everything seems to work find. This may just be a fix to the documentation saying that datefield filters MUST be in UTC.
Updated by daviddavis about 8 years ago
- Category changed from 14 to 23
- Tags Documentation added
Talked to Michael and datefields do need to be in UTC. Updating category to docs.
Updated by daviddavis about 8 years ago
- Subject changed from Cannot properly filter content units by date fields when using non-UTC timezones to UTC must be used when filtering fields by date
Updated by daviddavis about 8 years ago
- Subject changed from UTC must be used when filtering fields by date to UTC must be used when filtering records by date fields
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.