Python - How to import 'timezone' -- django

Import timezone

To import timezone, Add the following line to the top of your code.

from django.utils import timezone

 

For more information about timezone:
Django timezone