BST causing a nightmare with calendar dates
<p>I am putting together a weekly view calendar but I am having problems when getting to October 28th which is when the clocks go forward.  The calendar skips a day</p>

<p>My code so far...</p>

<pre><code>//get viewed date from form and add either a week to it or take a week away
        if(isset($_POST['add_week'])){
                $last_week_ts = strtotime($_POST['last_week']);
                $display_week_ts = $last_week_ts + (3600 * 24 * 7);
        } else if (isset($_POST['back_week'])) {
                $last_week_ts = strtotime($_POST['last_week']);
                $display_week_ts = $last_week_ts - (3600 * 24 * 7);
        } else {
                //sets the current day as the first day of the week so no good
                /*$display_week_ts = floor(time() / (3600 * 24)) * 3600 * 24;*/

                //Does't account for british summer time so days are out after 28th October
                $display_week_ts = strtotime("Monday noon");
        }

              $week_start = new DateTime(date("Y-m-d", $display_week_ts));

           for ($i = 0; $i &lt; 7; $i++)  
       {
            echo '&lt;td class="day"&gt;';
            $current_day_ts = $display_week_ts + ($i * 3600 *24);
            $daily_date = date('d-m-Y', $current_day_ts);
            $StartDate =  date('d', $current_day_ts);
            $MonthName = date('m', $current_day_ts);
            $Year = date('Y', $current_day_ts);
                            echo $daily_date;
                            echo '&lt;/td&gt;';
        }
</code></pre>

<p>$week_start contains the value of the beginning of the week currently in view in the calendar.  The first time it is opened the current week is displayed.  If the next week button is pressed a week is added to the $week_start value. At present is saved in a hidden field in a table and posted back on submit.  I have also tried storing $week_start as a TimeDate() object in a session</p>

<pre><code>        $week_start = new DateTime(date("Y-m-d", $display_week_ts));
        $S_SESSION['week_start'] = $week_start;
</code></pre>

<p>But when I try to call the session back and use it move move a week forward</p>

<pre><code>        $week_start = $S_SESSION['week_start'];
        $week_start-&gt;modify('+1 week');
</code></pre>

<p>I get the error 'Warning: DateTime::modify() [datetime.modify]: The DateTime object has not been correctly initialized by its constructor'.  After doing some digging I have found that DateTime doesn't seem to support sessions until 5.3 and I am using 5.2.17</p>

<p>I would be really grateful if someone can help me workout a way to make the variable $week_start be the first day of the week represented by $display_week_ts in such a way that BST doesn't cause a problem.  I have been working on this solidly for 3 days now</p>
