facetapi_get_timestamp_gap() does not correclty compute the gap for days or months having a daylight saving time transition. For example, working with local times in the America/Toronto timezone, I have

2013-03-10T00:00:00 = 1362891600
2013-03-11T00:00:00 = 1362974400

The difference is 82800 seconds, less than the standard 86400 seconds.

Comments

pfournier’s picture

StatusFileSize
new2.83 KB
pfournier’s picture

pfournier’s picture

Status: Needs review » Needs work

The last submitted patch, 1: facetapi-handle_dst-2154881-1.patch, failed testing.

pfournier’s picture

StatusFileSize
new2.7 KB

Corrected paths in patch.

pfournier’s picture

Status: Needs work » Needs review
drunken monkey’s picture

In #1888174-11: Offset between stored and indexed date, there is now a patch revamping the date facet rendering system to eliminate this and related problems and also make date facet URLs look much nicer. You might want to adapt that for the Facet API itself (and other backends), too.

cpliakas’s picture

Status: Needs review » Postponed (maintainer needs more info)

Thanks for the contributions.

As Thomas mentioned, I would like to see how the implementing modules can fix this since time handling is a very tricky thing to solve in Facet API as a lof of responsibility like in the backend, e.g. Apache Solr, database, etc. I am totally open to make whatever changes possible to help the issue, I just don't think that Facet API is in the best position to solve the root issue by itself.

Chris