Fix for missing and duplicate dates (e.g. 2015-11-04) in small calendar with Sunday...
commitd611bdac6452a33fc2a8e8507e039e386c9bc9f2
authorepsdky <sequex@hushmail.com>
Wed, 19 Aug 2015 20:21:04 +0000 (20 06:21 +1000)
committerbradymiller <bradymiller@users.sourceforge.net>
Sat, 22 Aug 2015 09:08:47 +0000 (22 02:08 -0700)
tree7bae17d4e454f167af09e5a4b39bb5d3138fc7bf
parent35b74203715f012cf0953871b2bbf5375955fb83
Fix for missing and duplicate dates (e.g. 2015-11-04) in small calendar with Sunday as first day

(I started with the clue posted on the forum by Daniel Pflieger that the month view did not have the bug (thanks Daniel))

In a timezone where daylight saving ends on the first Sunday of a particular month and that Sunday falls on the 1st and also the small calender is set with Sunday as the first day of the week, then the problem of the appearance of two instances of Sunday 1st and missing Wednesday 4th will occur.

Two Sundays appear since the code for both the day and week view are not dealing properly with Sunday having 25 hours, the timestamp created for "Monday" falls within the set of possible timestamps for Sunday. Also, because the code does not see an end of row day ($DOWlist[6]) between the two instances of Sunday 1st (first day of row ($DOWlist[0])) two first rows are output, the first having no closing tr tag and only one element.

The code for the day and week view calculate subsequent timestamps by adding 86400 + 1000 seconds (1 day + 10000 secs) to the current timestamp but since this process is starting an hour behind where it should, it jumps over Wednesday 4th (no corresponding timestamp is created).
interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html