diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bd1db9..be818b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog (This document uses YYYY-MM-DD) +## [v2.2.2] - 2022-03-26 + +### Fixed + - Timeline overflow conditions, time is now replaced with platform max/min on OverflowError. + ## [v2.2.1] - 2022-03-26 ### Fixed diff --git a/memos.py b/memos.py index 6e4a4c2..12ce171 100644 --- a/memos.py +++ b/memos.py @@ -68,9 +68,9 @@ def txt2delta(txt): timed = timedelta(0) except OverflowError: if sign < 0: - return timedelta(min) + return timedelta.min else: - return timedelta(max) + return timedelta.max return sign*timed def pcfGrammar(td): @@ -1022,7 +1022,13 @@ class PesterMemo(PesterConvo): timed = time - datetime.now() s = (timed.seconds // 60)*60 timed = timedelta(timed.days, s) - except ValueError: + except OverflowError: + if secs < 0: + timed = timedelta.min + else: + timed = timedelta.max + except (OSError, ValueError) as e: + print(e) try: if cmd == "i": timed = timedelta(0) diff --git a/version.py b/version.py index 15f378c..5860351 100644 --- a/version.py +++ b/version.py @@ -1,2 +1,2 @@ -_pcVersion = "Alt. v2.2.1" -buildVersion = "v2.2.1" +_pcVersion = "Alt. v2.2.2" +buildVersion = "v2.2.2"