из django.core.management.base импорт BaseCommand из django.utils импорт часового пояса
class Command (BaseCommand): help = 'Отображает текущее время'
def handle(self, *args, **kwargs):
time = timezone.now().strftime('%X')
self.stdout.write("It's now %s" % time)