> I need to compare these datetimes, and if I do that I get the dreaded
> "can't compare offset-naive and offset-aware datetimes" error.

If you're sure the naive datetimes are UTC, this should work:

import pytz

dt = pytz.utc.localize(dateutil.parser.parse('2016-04-27T00:00:00'))

You can then compare it with other tz-containing datetime objects.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to