dealing with DATE_RFC3339 datetime values
<p>I am integrating an application that provides datetime values using DATE_RFC3339, and provides the following results:</p>

<pre><code>        [created] =&gt; 2012-06-17T03:29:46-07:00
        [updated] =&gt; -0001-11-30T00:00:00-08:00
</code></pre>

<p>I wish to display the last modified value, which is the updated value if it exists, or the created value if there isn't an updated value.</p>

<p>If the sql database doesn't have an updated value, it appears to default to 0000-00-00 00:00:00.  It then appears to converts it to DATE_RFC3339 similar to the following:</p>

<pre><code>date(DATE_RFC3339, strtotime('0000-00-00 00:00:00'))
</code></pre>

<p>I don't know why it does this conversion, however, would rather not change it.  Instead, I would rather deal with the data that it provides in my application.</p>

<p>So, my question....</p>

<p>How should I determine that -0001-11-30T00:00:00-08:00 represents an empty value?  Maybe starts out with a hyphen (-)?</p>

<p>Next, how should I format 2012-06-17T03:29:46-07:00 so it looks more presentable?</p>

<p>Thank you</p>
