<s> from django . core . management . base import BaseCommand , CommandError <EOL> from django . conf import settings <EOL> from django . utils . timezone import utc <EOL> import datetime <EOL> from downtime . models import Period <EOL> class Command ( BaseCommand ) : <EOL> help = '<STR_LIT>' <EOL> def handle ( self , * args , ** options ) : <EOL> if getattr ( settings , '<STR_LIT>' , False ) : <EOL> p = Period ( enabled = True , start_time = datetime . datetime . utcnow ( ) . replace ( tzinfo = utc ) ) <EOL> else : <EOL> p = Period ( enabled = True , start_time = datetime . datetime . now ( ) ) <EOL> p . save ( ) <EOL> self . stdout . write ( '<STR_LIT>' ) </s>
