diff --git a/calsocial/calendar_system/gregorian.py b/calsocial/calendar_system/gregorian.py index 0967b0d..f80a767 100644 --- a/calsocial/calendar_system/gregorian.py +++ b/calsocial/calendar_system/gregorian.py @@ -92,11 +92,11 @@ class GregorianCalendar(CalendarSystem): @property def prev_month_name(self): if self.timestamp.month == 1: - ts = self.prev_year.replace(month=12) + timestamp = self.prev_year.replace(month=12) else: - ts = self.timestamp.replace(month=self.timestamp.month - 1) + timestamp = self.timestamp.replace(month=self.timestamp.month - 1) - return self.month_names[ts.month - 1] + return self.month_names[timestamp.month - 1] @property @to_timestamp @@ -109,11 +109,11 @@ class GregorianCalendar(CalendarSystem): @property def next_month_name(self): if self.timestamp.month == 12: - ts = self.prev_year.replace(month=1) + timestamp = self.prev_year.replace(month=1) else: - ts = self.timestamp.replace(month=self.timestamp.month + 1) + timestamp = self.timestamp.replace(month=self.timestamp.month + 1) - return self.month_names[ts.month - 1] + return self.month_names[timestamp.month - 1] @property @to_timestamp diff --git a/calsocial/forms.py b/calsocial/forms.py index a93504b..3b0e4b6 100644 --- a/calsocial/forms.py +++ b/calsocial/forms.py @@ -78,11 +78,11 @@ class EventForm(FlaskForm): def populate_obj(self, obj): FlaskForm.populate_obj(self, obj) - tz = self.time_zone.data + timezone = self.time_zone.data - obj.time_zone = str(tz) - obj.start_time = tz.localize(self.start_time.data).astimezone(pytz.utc) - obj.end_time = tz.localize(self.end_time.data).astimezone(pytz.utc) + obj.time_zone = str(timezone) + obj.start_time = timezone.localize(self.start_time.data).astimezone(pytz.utc) + obj.end_time = timezone.localize(self.end_time.data).astimezone(pytz.utc) def validate_end_time(self, field): if field.data < self.start_time.data: