@@ -147,45 +147,38 @@ def end_datetime(self):
147147 return datetime_from_date (self .get_meeting_date (self .days ), self .tz ())
148148
149149 def get_00_cutoff (self ):
150- start_date = datetime .datetime (
151- year = self .date .year ,
152- month = self .date .month ,
153- day = self .date .day ,
154- tzinfo = datetime .timezone .utc ,
155- )
150+ """Get the I-D submission 00 cutoff in UTC"""
156151 importantdate = self .importantdate_set .filter (name_id = 'idcutoff' ).first ()
157152 if not importantdate :
158153 importantdate = self .importantdate_set .filter (name_id = '00cutoff' ).first ()
159154 if importantdate :
160155 cutoff_date = importantdate .date
161156 else :
162- cutoff_date = start_date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
163- cutoff_time = datetime_from_date (cutoff_date ) + self .idsubmit_cutoff_time_utc
157+ cutoff_date = self . date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
158+ cutoff_time = datetime_from_date (cutoff_date , datetime . timezone . utc ) + self .idsubmit_cutoff_time_utc
164159 return cutoff_time
165160
166161 def get_01_cutoff (self ):
167- start_date = datetime . datetime ( year = self . date . year , month = self . date . month , day = self . date . day , tzinfo = pytz . utc )
162+ """Get the I-D submission 01 cutoff in UTC"""
168163 importantdate = self .importantdate_set .filter (name_id = 'idcutoff' ).first ()
169164 if not importantdate :
170165 importantdate = self .importantdate_set .filter (name_id = '01cutoff' ).first ()
171166 if importantdate :
172167 cutoff_date = importantdate .date
173168 else :
174- cutoff_date = start_date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
175- cutoff_time = datetime_from_date (cutoff_date ) + self .idsubmit_cutoff_time_utc
169+ cutoff_date = self . date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
170+ cutoff_time = datetime_from_date (cutoff_date , datetime . timezone . utc ) + self .idsubmit_cutoff_time_utc
176171 return cutoff_time
177172
178173 def get_reopen_time (self ):
179- start_date = datetime .datetime (year = self .date .year , month = self .date .month , day = self .date .day )
180- local_tz = pytz .timezone (self .time_zone )
181- local_date = local_tz .localize (start_date )
174+ """Get the I-D submission reopening time in meeting-local time"""
182175 cutoff = self .get_00_cutoff ()
183- if cutoff .date () == start_date :
176+ if cutoff .date () == self . date :
184177 # no cutoff, so no local-time re-open
185178 reopen_time = cutoff
186179 else :
187180 # reopen time is in local timezone. May need policy change?? XXX
188- reopen_time = local_date + self .idsubmit_cutoff_time_utc
181+ reopen_time = datetime_from_date ( self . date , self . tz ()) + self .idsubmit_cutoff_time_utc
189182 return reopen_time
190183
191184 @classmethod
0 commit comments