Project

Profile

Help

Issue #2353

closed

UTC must be used when filtering records by date fields

Added by daviddavis over 7 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.7
Platform Release:
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

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.

Actions #1

Updated by daviddavis over 7 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.

Actions #2

Updated by daviddavis over 7 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
Actions #3

Updated by daviddavis over 7 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
Actions #4

Updated by amacdona@redhat.com over 7 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #6

Updated by bmbouter about 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.

Actions #7

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #8

Updated by bmbouter almost 4 years ago

  • Category deleted (23)

Also available in: Atom PDF