mirror of
https://github.com/283375/arcaea-offline.git
synced 2025-04-09 17:40:17 +00:00
fix(external): fix_timestamp
digits counting (#3)
This commit is contained in:
parent
8c48d76c65
commit
e5c1e0ef4a
2
src/arcaea_offline/external/arcaea/common.py
vendored
2
src/arcaea_offline/external/arcaea/common.py
vendored
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user