mktime Adding Day to Given Date
<p>I'm using an application where the user has to define a startTime and an endTime for an object. I am using mktime() to make a time stamp from user input. Strangely enough, mktime() will add a day to <em>one</em> of the time submissions, alternating the mistake between startTime and endTime on each submission.</p>

<pre><code>        echo $_POST["start_Day"];
        echo " " . $_POST["end_Day"] . " ";

        if($_POST["start_Meridian"] == "pm") $_POST["start_Hour"] = $_POST["start_Hour"] + 12;
        if($_POST["end_Meridian"] == "pm") $_POST["end_Hour"] = $_POST["end_Hour"] + 12;
        $startTime = mktime($_POST["start_Hour"], $_POST["start_Minute"], $_POST["start_Second"], $_POST["start_Month"], $_POST["start_Day"], $_POST["start_Year"]);
        $endTime   = mktime($_POST["end_Hour"], $_POST["end_Minute"], $_POST["end_Second"], $_POST["end_Month"], $_POST["end_Day"], $_POST["end_Year"]);

        echo date('l jS \of F Y h:i:s A', $startTime);
        echo " "  . date('l jS \of F Y h:i:s A', $endTime);
</code></pre>

<p>To run through what is returned on two submissions:</p>

<ul>
<li>First form is submitted. Will output: <strong>21 26 Sunday 22nd of July 2012 12:05:04 AM Thursday 26th of July 2012 12:18:04 PM</strong></li>
<li>Second form is submitted. Will output: <strong>22 26 Sunday 22nd of July 2012 12:05:04 PM Friday 27th of July 2012 12:18:04 AM</strong></li>
</ul>

<p>So, oddly enough, my problem alternates between the two. I hope I'm missing something simple.</p>

<p>Thanks,
Carson</p>
