Fixed a comparison between aware and naive datetimes.

All calculations should be done with naive UTC datetimes.