In views/handlers/views_handler_filter_date.inc in op_simple and op_between functions strtotime should be used without the second (time) parameter if we do not use relative filter parameters. If the second parameter specified, strtotime returns relative values in some cases.

It's not a problem if we use CCYY-MM-DD HH:MM:SS format and some other formats but with the suggested fix it could be possible to use every formats specified in php documentation (http://php.net/manual/en/datetime.formats.relative.php),
for example "last day of previous month" and so.

See the attached patch to fix this issue.

CommentFileSizeAuthor
views_date_filter_fix.patch2.26 KBhuba
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chris Matthews’s picture

Status: Active » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue