Take current datetime and make 2 datetime variables? (6AM - 5:59AM)
<p>I'm trying to make an events page and I want to create 2 <code>datetime</code> variables. They would take the current time, and create one variable at 06:00 am, and one at 05:59 am. </p>

<p>The issue I'm having though is with the calculations.</p>

<p>If a person is visiting the page on <em>March 17, 11PM</em> - then var1 would be <em>March 17 06:00AM</em>, and var <em>2 March 18 05:59AM</em>.</p>

<p>However if a person is viewing the page on <em>March 18 01:00 AM</em>, then var 1 would still be <em>March 17 06:00AM</em>, the same goes for var2.</p>

<p>How would I take the below $date variable, and do the calculations for the other 2 variables?</p>

<pre><code>date_default_timezone_set('America/New_York');
$date = date('Y-m-d H:i:s', time());
</code></pre>

<p><img src="http://i.stack.imgur.com/itew1.png" alt=""></p>
