Timeline overflow conditions + ver.
This commit is contained in:
parent
1635d66e71
commit
c070745e26
3 changed files with 16 additions and 5 deletions
|
@ -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
|
||||
|
|
12
memos.py
12
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)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
_pcVersion = "Alt. v2.2.1"
|
||||
buildVersion = "v2.2.1"
|
||||
_pcVersion = "Alt. v2.2.2"
|
||||
buildVersion = "v2.2.2"
|
||||
|
|
Loading…
Reference in a new issue