Merge pull request #1987 from pbiering/fix-1984
fix issue#1984 (refix issue#1851)
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
* Improve: add workaround to remove empty lines in item to avoid reject by vobject parser
|
* Improve: add workaround to remove empty lines in item to avoid reject by vobject parser
|
||||||
* Improve: check/enforce RECURRENCE-ID MUST have the same value type as DTSTART in the recurring component (RFC 5545 3.8.4.4)
|
* Improve: check/enforce RECURRENCE-ID MUST have the same value type as DTSTART in the recurring component (RFC 5545 3.8.4.4)
|
||||||
* Fix: RECURRENCE-ID comparison on all-day events
|
* Fix: RECURRENCE-ID comparison on all-day events
|
||||||
|
* Fix: format_ut problem on 32-bit systems (got lost inbetween since fixed in 3.5.8)
|
||||||
|
|
||||||
## 3.6.0
|
## 3.6.0
|
||||||
|
|
||||||
|
|||||||
@@ -338,10 +338,13 @@ def format_ut(unixtime: int) -> str:
|
|||||||
elif unixtime >= DATETIME_MAX_UNIXTIME:
|
elif unixtime >= DATETIME_MAX_UNIXTIME:
|
||||||
r = str(unixtime) + "(>=MAX:" + str(DATETIME_MAX_UNIXTIME) + ")"
|
r = str(unixtime) + "(>=MAX:" + str(DATETIME_MAX_UNIXTIME) + ")"
|
||||||
else:
|
else:
|
||||||
if sys.version_info < (3, 11):
|
if sys.maxsize > 2**32:
|
||||||
dt = datetime.datetime.utcfromtimestamp(unixtime)
|
if sys.version_info < (3, 11):
|
||||||
|
dt = datetime.datetime.utcfromtimestamp(unixtime)
|
||||||
|
else:
|
||||||
|
dt = datetime.datetime.fromtimestamp(unixtime, datetime.UTC)
|
||||||
else:
|
else:
|
||||||
dt = datetime.datetime.fromtimestamp(unixtime, datetime.UTC)
|
dt = datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc) + datetime.timedelta(seconds=unixtime)
|
||||||
r = str(unixtime) + "(" + dt.strftime('%Y-%m-%dT%H:%M:%SZ') + ")"
|
r = str(unixtime) + "(" + dt.strftime('%Y-%m-%dT%H:%M:%SZ') + ")"
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user