Skip to content

Commit

Permalink
++TickingDateTimeFactory.move_to
Browse files Browse the repository at this point in the history
added missing move_to, resolves #350
  • Loading branch information
ashishnitinpatil authored Feb 11, 2024
1 parent 78b4437 commit eaa7459
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions freezegun/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ def __init__(self, time_to_freeze, start):
def __call__(self):
return self.time_to_freeze + (real_datetime.now() - self.start)

def move_to(self, target_datetime):
"""Moves frozen date to the given ``target_datetime``"""
self.time_to_freeze = _parse_time_to_freeze(target_datetime)


class FrozenDateTimeFactory:

Expand Down

0 comments on commit eaa7459

Please sign in to comment.