New card objects when created are now timezone-aware in addition to being UTC
When cards are repeated, the time value they receive must be timezone-aware and UTC
Updated the README with new example
Added new tests and modified the old one
Bumped major version from 1.2.0 -> 2.0.0 since these are breaking changes
For developers using previous versions of py-fsrs, they can update an old card object by using the following code:
# where card_object is a v1 py-fsrs card...
import datetime
card_object.due = card_object.due.replace(tzinfo=datetime.timezone.utc)
if hasattr(card_object, 'last_review'):
card_object.last_review = card_object.last_review.replace(tzinfo=datetime.timezone.utc)
Let me know if there are any questions or issues 👍
PR to address issue #28
For developers using previous versions of py-fsrs, they can update an old card object by using the following code:
Let me know if there are any questions or issues 👍