2 Commits

Author SHA1 Message Date
0764308638 chore: v0.2.1 2023-11-01 14:09:44 +08:00
e5c1e0ef4a fix(external): fix_timestamp digits counting (#3) 2023-10-27 00:23:17 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "arcaea-offline"
version = "0.2.0"
version = "0.2.1"
authors = [{ name = "283375", email = "log_283375@163.com" }]
description = "Manage your local Arcaea score database."
readme = "README.md"

View File

@ -27,7 +27,7 @@ def fix_timestamp(timestamp: int) -> Union[int, None]:
# but that's way too later than 9999-12-31 23:59:59, 253402271999,
# I don't think Arcaea would still be an active updated game by then.
# so don't mind those small issues, just use this.
digits = int(math.log10(timestamp)) + 1
digits = int(math.log10(abs(timestamp))) + 1 if timestamp != 0 else 1
if digits < 5:
return None
timestamp_str = str(timestamp)