From c73a53d815c91a73d456d9bcf6ae2940afbbb351 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 13 Dec 2025 08:06:44 +0100 Subject: [PATCH] remove copy-paste overhead --- radicale/utils.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/radicale/utils.py b/radicale/utils.py index eee80c99..14c0f0f3 100644 --- a/radicale/utils.py +++ b/radicale/utils.py @@ -330,18 +330,6 @@ def format_int(value: int, binary: bool = False) -> str: unit = "" return ("%.1f %s" % (value, unit)) - if unixtime <= DATETIME_MIN_UNIXTIME: - r = str(unixtime) + "(<=MIN:" + str(DATETIME_MIN_UNIXTIME) + ")" - elif unixtime >= DATETIME_MAX_UNIXTIME: - r = str(unixtime) + "(>=MAX:" + str(DATETIME_MAX_UNIXTIME) + ")" - else: - if sys.version_info < (3, 11): - dt = datetime.datetime.utcfromtimestamp(unixtime) - else: - dt = datetime.datetime.fromtimestamp(unixtime, datetime.UTC) - r = str(unixtime) + "(" + dt.strftime('%Y-%m-%dT%H:%M:%SZ') + ")" - return r - def limit_str(content: str, limit: int) -> str: length = len(content)