Skip to content

Commit

Permalink
join ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
vlopezferrando committed Jan 1, 2025
1 parent 78ef106 commit c86a522
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/fsrs/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ def review_card(
tuple[Card, ReviewLog]: A tuple containing the updated, reviewed card and its corresponding review log.
"""

if review_datetime is not None:
if review_datetime is None:
review_datetime = datetime.now(timezone.utc)
else:
if review_datetime.tzinfo is None:
review_datetime = review_datetime.replace(tzinfo=timezone.utc)
elif review_datetime.tzinfo != timezone.utc:
review_datetime = review_datetime.astimezone(timezone.utc)

if review_datetime is None:
review_datetime = datetime.now(timezone.utc)

card = deepcopy(card)

review_log = ReviewLog(
Expand Down

0 comments on commit c86a522

Please sign in to comment.