Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created July 30, 2014 20:59
Show Gist options
  • Select an option

  • Save jamescarr/33ef9455a745477bbe32 to your computer and use it in GitHub Desktop.

Select an option

Save jamescarr/33ef9455a745477bbe32 to your computer and use it in GitHub Desktop.
>>> week_ago = datetime.datetime.now() - datetime.timedelta(days=7)
>>> week_ago > parser.parse('2014-07-30T19:06:39.000Z')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't compare offset-naive and offset-aware datetimes
>>> week_ago < parser.parse('2014-07-30T19:06:39.000Z')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't compare offset-naive and offset-aware datetimes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment