special price on date_end
Posted: Thu Dec 29, 2016 11:01 am
The sql statement on every related model files of this part is:
but this is wrong.
For example, if I have a special price from 2016-12-20 to 2016-12-29, and today is the end day, no records will be found. Is this right? I think this is not right.
And this is because date_end 2016-12-29 doesn't bigger than NOW() 2016-12-29 10:50:30
I have to use :
I'm curios, in version 2.2.0.0, it is so, and in 2.3.0.2, still the same. No one report this bug?
Or some thing with my understanding?
Code: Select all
ps.date_end > NOW()
For example, if I have a special price from 2016-12-20 to 2016-12-29, and today is the end day, no records will be found. Is this right? I think this is not right.
And this is because date_end 2016-12-29 doesn't bigger than NOW() 2016-12-29 10:50:30
I have to use :
Code: Select all
ps.date_end >= NOW() - INTERVAL 1 DAY
// or
ps.date_end >= CURRENT_DATE()
// or
ps.date_end >= CURDATE()
Or some thing with my understanding?