Fixed Attachments filtering does not work properly

Old Nick

Well-known member
Affected version
2.3.0
As title...

If you select start and end date at the same date there is no results found

Capture d'écran 2024-07-06 232558.webp

Results dates are day-1 than dates selected

Capture d'écran 2024-07-06 232700.webp

Capture d'écran 2024-07-06 232705.webp
 
This is roughly expected, but perhaps the language is confusing. Ranges are typically half-open, where the end of the interval is not inclusive, so it's showing attachments uploaded from the start date until (but not after) the end date.
 
But even the start date is shifted, if I choose June 30 I expect the attachments from June 30 to be included, there the result displays attachments from July 1... Is this also expected?

And so what date range i have to choose to get results from just one day? If start and end days are not included?
For the June 30 i have to select a range from June 29 to July 1... Weird...
 
That’s unexpected, I’ll take a look.

If you want results from just one day you should be able to select from that day until the next day.
 
Sorry, i'm wrong, date results are date-1
So if i want to get results from the June 15 to June 20 i have to select the range June 16 - June 21
So if i want to get results for just one day, the June 16 for example i have to select the range June 16 - June 17 and the range displayed in the results is June 15 - June 16
Weirdy...
 
Hmm, I haven't been able to reproduce any issues with this so far. The selected dates correspond to the midnight timestamps in your account timezone, and even looking directly at the query nothing seems out of place. Though one thing I did notice was the query constrains the attachment attach_date, but the displayed date is the attachment data upload_date. These are usually equal but there may be a discrepancy.
 
Can't say more than i said.
I just tried again (all add-ons disabled) and...

Global time zone is set to UTC+1 for my forum, time zone set in my profile is UTC.

DATE RANGE more than 1 day
1721893887630.webp

SAME START and END DATES
1721894116058.webp

DATE RANGE two days
1721894155155.webp
G
 
  1. I set this filtering
    1. START DATE : 5/7/24
    2. END DATE : 10/7/24
  2. Dates displayed on results block
    1. START DATE : 4/7/24
    2. END DATE : 9/7/24
  3. DATE first attachment in result : 5/7/24
  4. DATE last attachment in result : 9/7/24
There is no inconsistency in the error, it is always like this but it is totally confusing, it should be simple and not require thinking to find the results between this date and that date. If I want the results between July 4 and July 8 then I enter July 4 and July 8 in the filter settings and I get results between July 4 and July 8. No ?
 
Yes, however that's exactly what happens for me. I select the dates and it shows me the attachments from those dates. I'm not trying to dispute that you're getting a different and confusing behavior, I just haven't been able to figure out why yet :)

1721895029827.webp

Out of curiosity, does your OS timezone match that of the account?
 
I didn't understand that this didn't happen with you, I stuck to the previous explanations, sorry.
This is roughly expected, but perhaps the language is confusing. Ranges are typically half-open, where the end of the interval is not inclusive, so it's showing attachments uploaded from the start date until (but not after) the end date.

Out of curiosity, does your OS timezone match that of the account?
1721895220151.webp

1721895255400.webp
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.1).

Change log:
Fix attachment list filter bar dates being displayed in wrong timezone
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom