Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Facets
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2016 at 16:53 UTC
Updated:
29 Mar 2016 at 06:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
stefan.r commentedComment #3
drunken monkeyThe explanation for closing that PHP bug report sounds utterly ridiculous. Why should "any not-parsed date item" being "initialised with the current values" mean that February becomes March?
If you're the Stefan from the PHP issue I'd try to re-open it. I don't think "derick" read it correctly.
However, if I understand this correctly, it would also mean this would fail on the 29th, 30th or 31st of any other month, right? Is there any way in PHP to set the current time, so we could test this easily?
However, it seems like this would make sense even if there weren't any bugs caused by this, simply conceptually – we don't care about any parts of the current time, so we should definitely reset them.
Your patch seems to solve that pretty neatly, and I can't find anything wrong with it. So, after getting your feedback on my comment, and if no-one else objects, I'll commit this in the next days.
In any case, thanks a lot for reporting this issue!
Comment #4
stefan.r commentedPar for the course sadly... I've seen much worse bugs closed for "not being a bug" :)
I don't think so!
Not sure about the 30th/31st, may be worth testing.
Comment #5
drunken monkeyOK, in any case I'll believe that this fixes the problem. (No way to test now, it seems.)
So, committed. Thanks again!
OK, I've made a note to try it out at the end of the month. That would be considerably worse than being wrong once every four years.
Comment #8
drunken monkeyIt really is also wrong at the end of each month. Your testing code from the PHP issue just spit out a datetime on March 1 for me.
So, thanks a lot for spotting this! No telling how much confusion this has already caused!