title: Checking if a datetime object in mongodb is in UTC format or not from python
body: <p>In <code>mongodb</code>, a field called <code>joining_date</code> appears as </p>
  
  <pre><code>"Sun Dec 19 2010 05:35:55 GMT+0000 (UTC)"
  </code></pre>
  
  <p>This as you see is a UTC date .</p>
  
  <p>But the same field when accessed from pymongo appears as</p>
  
  <pre><code> datetime.datetime(2010, 12, 19, 5, 35, 55, 286000)
  </code></pre>
  
  <p>From python i need to check that the date is in utc format or not. </p>
  
  <p>Problem: I get a strange result as shown below</p>
  
  <pre><code>v = datetime(2010, 12, 19, 5, 35, 55, 286000)
  v.tzinfo == pytz.utc # Returns False !..why ?
  </code></pre>
  
  <p>How can I get back the original string <code>Sun Dec 19 2010 05:35:55 GMT+0000 (UTC)</code> from <code>datetime.datetime(2010, 12, 19, 5, 35, 55, 286000)</code> or how can I check if <code>datetime.datetime(2010, 12, 19, 5, 35, 55, 286000)</code> is in UTC format or not ?</p>