Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SijmenHuizenga committed Oct 23, 2023
1 parent ed2c493 commit 51d762e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,11 @@ def _schedule_next_run(self) -> None:
self.next_run = self.next_run.astimezone().replace(tzinfo=None)

# Usually when normalization of a timestamp causes the timestamp to change,
# it preseves the moment in time and changes the local timestamp.
# it preserves the moment in time and changes the local timestamp.
# This method applies pytz normalization but preserves the local timestamp, in fact changing the moment in time.
def _normalize_preserve_timestamp(self, input: datetime.datetime) -> datetime.datetime:
if self.at_time_zone is None:
return input
normalized = self.at_time_zone.normalize(input)
return normalized.replace(day=input.day, hour=input.hour, minute=input.minute, second=input.second, microsecond=input.microsecond)

Expand Down

0 comments on commit 51d762e

Please sign in to comment.