title: How can I check whether a variable is an instance of datetime.datetime or datetime.date
body: <p>I've tried</p>
  
  <pre><code>In [16]: import datetime
  
  In [17]: now = datetime.datetime.utcnow()
  
  In [18]: isinstance(now, datetime.date)
  Out[18]: True
  
  In [19]: isinstance(now, datetime.datetime)
  Out[19]: True
  </code></pre>
  
  <p>What I expected is that the first isinstance should return False. What happened?</p>