I created a view which summarizes nodes by day of a date field.
Although the overview shows
- May 5 2008 (2)
- May 28 2008 (1)
I can't see the nodes when clicking on a date.
Changing
SELECT DISTINCT(node.nid), node_data_field_tag.field_tag_value ... AND (node_data_field_tag.field_tag_value>='2008-05-28 00:00:00') AND (node_data_field_tag.field_tag_value<='2008-05-28 23:59:59') ) LIMIT 0, 15
to
SELECT DISTINCT(node.nid), node_data_field_tag.field_tag_value ... AND (node_data_field_tag.field_tag_value>='2008-05-28T00:00:00') AND (node_data_field_tag.field_tag_value<='2008-05-28T23:59:59') ) LIMIT 0, 15
shows the nodes (notice the 'T' added between the date and time strings).
I permanently changed date_views.inc to
//$query->add_where(date_sql('DATE', $table .'.'. $value, $field_type, $offset) .">='". str_replace('T', ' ', $range[0]) ."'");
//$query->add_where(date_sql('DATE', $table .'.'. $value, $field_type, $offset) ."<='". str_replace('T', ' ', $range[1]) ."'");
$query->add_where(date_sql('DATE', $table .'.'. $value, $field_type, $offset) .">='". $range[0] ."'");
$query->add_where(date_sql('DATE', $table .'.'. $value, $field_type, $offset) ."<='". $range[1] ."'");I don't know who came up with str_replace('T',' ',...) in the first place but it still seems odd to me ... Is this a bug or a configuration issue? I only store year, month and day without timezone info.
Thanks for your suggestions
Comments
Comment #1
karens commentedThere have been lots of updates to the filters since this was reported. I'm pretty sure they're working right now.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.