Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294458

Views exposed filter on date only field gives incorrect results

$
0
0

What are the steps required to reproduce the bug?

  1. Add a date field to content type.
  2. Field settings: Date type: Date only
  3. Add one node, filling a date field, for example "2016-10-15".
  4. Under your user account set Locale settings: Time zone. For example "Europe/Tallinn".
  5. Create a view adding with exposed filter on the date field.
  6. Operator: Equals
  7. Save and go to the view page
  8. Search by the filter: "2016-10-15". Result: Nothing. Expected: Something
  9. Search by the filter: "2016-10-16". Result: Something. Expected: Nothing

Reason

The filter applies timezone calculation even when the field does not hold dates.

Remedy

In views filter don't apply timezone while dealing with date-only field.


Viewing all articles
Browse latest Browse all 294458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>