File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525from ietf .person .models import Person
2626from ietf .utils .storage import NoLocationMigrationFileSystemStorage
2727from ietf .utils .text import xslugify
28+ from ietf .utils .timezone import date2datetime
2829
2930countries = pytz .country_names .items ()
3031countries .sort (lambda x ,y : cmp (x [1 ], y [1 ]))
@@ -116,7 +117,7 @@ def get_00_cutoff(self):
116117 cutoff_date = importantdate .date
117118 else :
118119 cutoff_date = start_date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
119- cutoff_time = cutoff_date + self .idsubmit_cutoff_time_utc
120+ cutoff_time = date2datetime ( cutoff_date ) + self .idsubmit_cutoff_time_utc
120121 return cutoff_time
121122
122123 def get_01_cutoff (self ):
@@ -128,7 +129,7 @@ def get_01_cutoff(self):
128129 cutoff_date = importantdate .date
129130 else :
130131 cutoff_date = start_date + datetime .timedelta (days = ImportantDateName .objects .get (slug = 'idcutoff' ).default_offset_days )
131- cutoff_time = cutoff_date + self .idsubmit_cutoff_time_utc
132+ cutoff_time = date2datetime ( cutoff_date ) + self .idsubmit_cutoff_time_utc
132133 return cutoff_time
133134
134135 def get_reopen_time (self ):
Original file line number Diff line number Diff line change @@ -34,4 +34,6 @@ def email_time_to_local_timezone(date_string):
3434
3535 return utc_to_local_timezone (d )
3636
37-
37+ def date2datetime (date , tz = pytz .utc ):
38+ return datetime .datetime (* (date .timetuple ()[:6 ]), tzinfo = tz )
39+
You can’t perform that action at this time.
0 commit comments