fix(external): fix_timestamp current timestamp digits counting

This commit is contained in:
283375 2023-10-18 01:17:12 +08:00
parent 24d46e4615
commit 13ea4d9e97
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk

View File

@ -31,7 +31,7 @@ def fix_timestamp(timestamp: int) -> Union[int, None]:
if digits < 5:
return None
timestamp_str = str(timestamp)
current_timestamp_digits = int(math.log10(int(time.time() / 1000))) + 1
current_timestamp_digits = int(math.log10(int(time.time()))) + 1
timestamp_str = timestamp_str.ljust(current_timestamp_digits, "0")
return int(timestamp_str, 10)