Menu

#128 Results off by one day when selecting a date in calender

v1.9
open-wont-fix
None
5
2006-09-17
2005-10-05
Anonymous
No

I am not sure if this corresponds to
<http://sourceforge.net/tracker/index.php?
func=detail&aid=1249013&group_id=127624&atid=70901
8>, just to make sure:

I'm running dasBlog 1.8.5223.0. Create two posts on
two successive days, let's say Oct. 5 and Oct 6. When
you click on Oct. 5 in the calendar control on the front
page the post from Oct. 6 will occur first, and below the
post from Oct. 5. Clicking on Oct. 6 shows the correct
result.

During my research I found that this occurs only when
you post on two days in a row. The problem source lies
in BlogDataSource.cs. dasBlog is using
DayEntryCollection.CriteriaHandlerFactory.OccursBefore
(startDateUtc.Date.AddDays(1)) to retrieve the the
entries on or before the clicked day. OccursBefore()
checks the passed against entry dates using <=.
However, the name of Occures*Before*() indicates it's
using <. After removing AddDays(1) selecting a date
works as expected.

Discussion

  • Scott Hanselman

    Scott Hanselman - 2005-10-10
    • assigned_to: nobody --> glucopilot
     
  • Omar Shahine

    Omar Shahine - 2006-01-29

    Logged In: YES
    user_id=955073

    eek, this is scary stuff to change.

     
  • paulb

    paulb - 2006-09-17
    • milestone: --> v1.9
    • status: open --> open-wont-fix
     
  • paulb

    paulb - 2006-09-17

    Logged In: YES
    user_id=1210842

    Still in 1.9.

    Doubt We'll be able to fix it, due to the way the entries
    are saved and the potential difference in date/time between
    the reader and the writer.

     

Log in to post a comment.