Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#168: Date Filtering

A simple date filter doesn’t appear to work.

Filter on date with the hardcoded value of say 2009-11-06 fails, yet 2009-11-06 to 2009-11-06 works.

I think it might be something to do with that self::SIMPLE is 0 in field.date.php, which could be interpreted as false?

I managed to recreate this, shut my laptop, opened it again, refreshed the page… and it was resolved. I can no longer recreate the bug!

I see the problem. Using a value of 2009-11-06 yields SQL like

AND DATE_FORMAT(`t31`.value, '%Y-%m-%d') IN ('2009-11-06 00:00:00')

which is obviously a problem. The H:i:s part should be left off.

Fixed. The behaviour now is, when a date string is just Y-m-d it will be expanded to be the equivalent of Y-m-d to Y-m-d. If the H:i:s part is specified, it will be kept and the SQL will look like:

AND DATE_FORMAT(`t31`.value, '%Y-%m-%d %H:%i:%s') IN ('2009-11-06 12:32:43')

So, this allows for very specify date matching.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details