tschellenbach/Django-facebook — pull request #247 by duduklein (2012-12-24 18:52:06+00:00)
Title: Use of Aware Timezones

Django 1.4 introduced Aware timezones (it's major new feature compared to 1.3).

When we use datetime.now() only, it gives a warning that the time format is naive. More info at https://docs.djangoproject.com/en/dev/topics/i18n/timezones/

So, I replaced the datetime.now with django.utils.timezone.now to remove this warning and make all the timezone formats "aware".

Also, the created_time from likes was using a standard datetime library to parse the time. This has the inconvenient of knowing previously the datetime format and adding the "+0000" at the end. I'm not sure that facebook always send dates like this, although all my examples are indeed like this.

I replaced this with python-dateutil library which already recognizes the correct format and returns an "aware" time format using dateutil.parser.parse