A project is using a blog archive based on the standard Relate template component which breaks down posts by year and month. It seems to work as expected in most scenarios but now I ran into some strange problem with the date filtering.
A blog had three posts created in the afternoon of November 1. The archive displays the count each month which is generated using a call to BlogHandler.GetEntries. In metacode GetEntries(2011-11-01 00:00 to 2011-12-01 00:00) returns the expected count, but (2011-10-01 00:00 to 2011-11-01 00:00) also counts the posts made on november 1 so the count for october is wrong.
Then, when I click either of the november or october links so that the entries are displayed (using an EntryQuery with the same date limits on the PublicationStart field) NO entries are returned for either of the months. For the full year the November 1 entries are displayed.
I could understand if this happened with entries published exactly at the tick when the month changes because it could be that some condition should be GT instead of GTE, LT instead of LTE etc. But these are entries several minutes apart on the afternoon. Because they are so far apart it can't be that they're compared using a timezone where it's actually midnight either. I checked the database calls and it seems the date queried is '2011-10-01 00:00' etc. I haven't checked the dates on actual entries in the database table yet because I don't have access to the database in the production environment.
Any similar experiences or ideas what might be going wrong?
A project is using a blog archive based on the standard Relate template component which breaks down posts by year and month. It seems to work as expected in most scenarios but now I ran into some strange problem with the date filtering.
A blog had three posts created in the afternoon of November 1. The archive displays the count each month which is generated using a call to BlogHandler.GetEntries. In metacode GetEntries(2011-11-01 00:00 to 2011-12-01 00:00) returns the expected count, but (2011-10-01 00:00 to 2011-11-01 00:00) also counts the posts made on november 1 so the count for october is wrong.
Then, when I click either of the november or october links so that the entries are displayed (using an EntryQuery with the same date limits on the PublicationStart field) NO entries are returned for either of the months. For the full year the November 1 entries are displayed.
I could understand if this happened with entries published exactly at the tick when the month changes because it could be that some condition should be GT instead of GTE, LT instead of LTE etc. But these are entries several minutes apart on the afternoon. Because they are so far apart it can't be that they're compared using a timezone where it's actually midnight either. I checked the database calls and it seems the date queried is '2011-10-01 00:00' etc. I haven't checked the dates on actual entries in the database table yet because I don't have access to the database in the production environment.
Any similar experiences or ideas what might be going wrong?