Skip to content

Commit

Permalink
drop unused function (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Aug 16, 2024
1 parent 86ea9c6 commit 92b38b7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions aioaws/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if TYPE_CHECKING:
from ._types import BaseConfigProtocol

__all__ = 'get_config_attr', 'to_unix_s', 'utcnow', 'ManyTasks', 'pretty_xml', 'pretty_response'
__all__ = 'get_config_attr', 'utcnow', 'ManyTasks', 'pretty_xml', 'pretty_response'

EPOCH = datetime(1970, 1, 1)
EPOCH_TZ = EPOCH.replace(tzinfo=timezone.utc)
Expand All @@ -26,14 +26,6 @@ def get_config_attr(config: 'BaseConfigProtocol', name: str) -> str:
raise TypeError(f'config.{name} must be a string not {s.__class__.__name__}')


def to_unix_s(dt: datetime) -> int:
if dt.utcoffset() is None:
diff = dt - EPOCH
else:
diff = dt - EPOCH_TZ
return int(round(diff.total_seconds()))


def utcnow() -> datetime:
return datetime.now(tz=timezone.utc)

Expand Down

0 comments on commit 92b38b7

Please sign in to comment.