I do get the warning messages below when I enable the filter by post date or filter by modification date facets. Attached patch fixes this.

Warning: timezone_open(): Unknown or bad timezone (0) in format_date() (line 1862 of /Users/larskleiner/Sites/bfi/drupal/core/includes/common.inc).
Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900 of /Users/larskleiner/Sites/bfi/drupal/core/includes/common.inc).

Comments

pwolanin’s picture

Status: Needs review » Needs work

The 0 is there to specify UTC.

The API changed from D6 (when it was seconds offset to GMT) to D7 where it seems to need to be a TZ identifier. Please re-roll with a change from 0 to 'UTC'.

larskleiner’s picture

Status: Needs work » Needs review
StatusFileSize
new1.27 KB

Thanks for explaining this. Attached the re-rolled patch.

pwolanin’s picture

Status: Needs review » Fixed

Thanks! committed:

#991590 by larskleiner: fix for API change to timezone param in format_date().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

acbramley’s picture

Is this still fixed in the latest dev release? I've got the Facetapi providing filter by updated and post date and I'm getting all these errors:

Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Notice: Undefined index: facet mincount allowed in apachesolr_facetapi_facet_info() (line 280 of /home/adamb/projects/mohbigbird/sites/all/modules/contrib/apachesolr/apachesolr.module).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /home/adamb/projects/mohbigbird/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /home/adamb/projects/mohbigbird/includes/common.inc).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1909 of /home/adamb/projects/mohbigbird/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1919 of /home/adamb/projects/mohbigbird/includes/common.inc).

The bottom 4 of which are the same errors which this patch was meant to fix. In saying that though, I can't even find that function in the module file :S