Generate start and ending datetimes in UTC based on a PST date
<p>I am taking in a parameter that is a date in PST timezone which will be in the format of "YYYY-MM-DD" (e.g. "2011-08-15").  This parameter is optional.  I have 2 questions that I've been struggling with.</p>

<p>I need to calculate the start and end datetime in <strong>UTC</strong> for this date.</p>

<p>So if the inputted date is <code>2011-08-15</code>, I want to get the start and end datetimes:</p>

<p><code>2011-08-15 07:00:00</code></p>

<p><code>2011-08-15 06:59:59</code></p>

<p>(These are essentially the beginning and end of day)</p>

<p>Second, is to handle the case when the date is not passed in. I want to default to the current PST date them and start from there.  So if the current datetime is <code>2011-08-01 10:00:00</code>, I want to get the same start and end datetimes similar to the first scenario except it's based on the inputted date.</p>

<p><code>2011-08-01 07:00:00</code></p>

<p><code>2011-08-01 06:59:59</code></p>

<p>I've been pulling my hair out dealing with date and datetime conversions. I'm sure I'm missing something super straightforward.</p>
