Used django.util.timezone instead of datetime module. Works for both timezone aware and unaware time.