Fix for missing and duplicate dates (e.g. 2015-11-04) in small calendar with Sunday...
commit6af4e74e089b5f4ab71e8a97a1c74325484e86df
authorepsdky <sequex@hushmail.com>
Wed, 19 Aug 2015 20:27:25 +0000 (20 06:27 +1000)
committerbradymiller <bradymiller@users.sourceforge.net>
Sat, 22 Aug 2015 09:09:23 +0000 (22 02:09 -0700)
treed5d21406cd5af0da1c67abb35e24941cadb5faa3
parentd611bdac6452a33fc2a8e8507e039e386c9bc9f2
Fix for missing and duplicate dates (e.g. 2015-11-04) in small calendar with Sunday as first day (week view)

(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/week/ajax_template.html