From: Serge Hallyn Date: Thu, 22 May 2025 11:27:11 +0000 (-0500) Subject: Revert "tests/: implement `days_since_epoch()`" X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d99accb329b1c854cebb26eb36f6f9dc0b45768;p=thirdparty%2Fshadow.git Revert "tests/: implement `days_since_epoch()`" This reverts commit b56fdc329f3deb26a04e54b9e4729fa8116b6bfc. --- diff --git a/tests/system/framework/misc/__init__.py b/tests/system/framework/misc/__init__.py index 0ee8a080a..92e0b76b9 100644 --- a/tests/system/framework/misc/__init__.py +++ b/tests/system/framework/misc/__init__.py @@ -2,7 +2,6 @@ from __future__ import annotations -import datetime from typing import Any @@ -41,14 +40,3 @@ def to_list_of_strings(value: Any | list[Any] | None) -> list[str]: :rtype: list[str] """ return [str(x) for x in to_list(value)] - - -def days_since_epoch(): - """ - Gets the current date and returns the number of days since 1970-01-01 UTC, this time is also referred to as the - Unix epoch. - """ - epoch = datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc) - now_utc = datetime.datetime.now(datetime.timezone.utc) - delta = now_utc - epoch - return delta.days