This commit is contained in:
dj
2024-04-12 03:37:19 +03:00
parent bd2ea16496
commit ed8425c15a
+2 -2
View File
@@ -195,9 +195,9 @@ def convert_date(from_time, full=True, second=True) -> Union[str, int]:
# Генерация уникального айди # Генерация уникального айди
def gen_id() -> int: def gen_id(len_id: int = 16) -> int:
mac_address = uuid.getnode() mac_address = uuid.getnode()
time_unix = int(str(time.time_ns())[:16]) time_unix = int(str(time.time_ns())[:len_id])
return mac_address + time_unix return mac_address + time_unix