Fix daylight saving time issue in periods.py
Fix tests for aware datetime objects.
Fix periods for naive datetime objects.