title: ISO 8601 Field to Python DateTime Field
body: <p>I am taking in a DateTimeField from an API with the format of "2016-08-09T02:16:15Z". I am using the code below to parse it and turn it to what I thought was a date time field, but am getting an error from one of my class methods to compare the time. Please see the parsing code below:</p>
  
  <pre><code>time= dateutil.parser.parse(x['MatchTime']) #MatchTime is the ISO 8601 field
  </code></pre>
  
  <p>The time seems to be pulling correctly, but when I add it to my Game model, pasted below, <strong>my is_live</strong> method is giving me an error</p>
  
  <p>Game model:</p>
  
  <pre><code>class Game(models.Model):
      time = models.DateTimeField(null=True, blank=True)
      livePick = models.BooleanField(default=True)
  
      def is_live(self):
          now = timezone.now()
          now.astimezone(timezone.utc).replace(tzinfo=None)
          if now &lt; self.time:
              return True
          else:
              return False
  </code></pre>
  
  <p>This is the error I am getting when I run the script to add in the Game with the time</p>
  
  <pre><code>line 34, in is_live
  if now &lt; self.time:
  TypeError: unorderable types: datetime.datetime() &lt; NoneType()
  </code></pre>
  
  <p>Update:
  Time is added to the Game model with the following</p>
  
  <pre><code>g = Game.objects.create(team1=team1, team2=team2)
  g.time = time 
  g.save()
  </code></pre>
  
  <p>Any help is greatly appreciated. Thank you!</p>