|
1 | | ---- a/radicale/utils.py 2025-11-29 08:33:06.000000000 -0600 |
2 | | -+++ b/radicale/utils.py 2025-11-30 10:42:22.737736171 -0600 |
3 | | -@@ -280,10 +280,11 @@ |
| 1 | +--- a/radicale/utils.py 2026-01-10 00:52:03.000000000 -0600 |
| 2 | ++++ b/radicale/utils.py 2026-01-10 13:31:34.039736783 -0600 |
| 3 | +@@ -333,16 +333,11 @@ |
4 | 4 | if sys.platform == "win32": |
5 | 5 | # TODO check how to support this better |
6 | 6 | return str(unixtime) |
7 | 7 | - if unixtime <= DATETIME_MIN_UNIXTIME: |
8 | 8 | - r = str(unixtime) + "(<=MIN:" + str(DATETIME_MIN_UNIXTIME) + ")" |
9 | | -+ if unixtime < DATETIME_MAX_UNIXTIME: |
10 | | -+ dt = datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc) + datetime.timedelta(seconds=unixtime) |
11 | | -+ r = str(unixtime) + "(" + dt.strftime('%Y-%m-%dT%H:%M:%SZ') + ")" |
12 | | - elif unixtime >= DATETIME_MAX_UNIXTIME: |
| 9 | +- elif unixtime >= DATETIME_MAX_UNIXTIME: |
13 | 10 | - r = str(unixtime) + "(>=MAX:" + str(DATETIME_MAX_UNIXTIME) + ")" |
| 11 | +- else: |
| 12 | +- if sys.version_info < (3, 11): |
| 13 | +- dt = datetime.datetime.utcfromtimestamp(unixtime) |
| 14 | +- else: |
| 15 | +- dt = datetime.datetime.fromtimestamp(unixtime, datetime.UTC) |
| 16 | ++ if unixtime < DATETIME_MIN_UNIXTIME: |
| 17 | ++ dt = datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc) + datetime.timedelta(seconds=unixtime) |
| 18 | + r = str(unixtime) + "(" + dt.strftime('%Y-%m-%dT%H:%M:%SZ') + ")" |
| 19 | ++ else: |
14 | 20 | + r = str(unixtime) + "(>MAX:" + str(DATETIME_MAX_UNIXTIME) + ")" |
15 | | - else: |
16 | | - if sys.version_info < (3, 11): |
17 | | - dt = datetime.datetime.utcfromtimestamp(unixtime) |
| 21 | + return r |
| 22 | + |
| 23 | + |
0 commit comments