From 8d8739a694aad37a091a00eb7d72f706b879b994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Je=C5=A1i=C4=87?= <34022788+djesic@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:23:52 +0200 Subject: [PATCH] Timestamp fix --- nextcloud_create_doc_and_share.py | 2 +- nextcloud_create_user.py | 2 +- nextcloud_docs_collaboration.py | 2 +- nextcloud_install.py | 2 +- nextcloud_talk.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nextcloud_create_doc_and_share.py b/nextcloud_create_doc_and_share.py index d4ec37ff..19b8d687 100644 --- a/nextcloud_create_doc_and_share.py +++ b/nextcloud_create_doc_and_share.py @@ -3,7 +3,7 @@ from time import time_ns from playwright.sync_api import Playwright, sync_playwright def log_note(message: str) -> None: - timestamp = round(time_ns() * 1000) + timestamp = str(time_ns())[:16] print(f"{timestamp} {message}") def run(playwright: Playwright) -> None: diff --git a/nextcloud_create_user.py b/nextcloud_create_user.py index 98e181ad..51c32121 100644 --- a/nextcloud_create_user.py +++ b/nextcloud_create_user.py @@ -4,7 +4,7 @@ from time import time_ns from playwright.sync_api import Playwright, sync_playwright def log_note(message: str) -> None: - timestamp = round(time_ns() * 1000) + timestamp = str(time_ns())[:16] print(f"{timestamp} {message}") def create_user(playwright: Playwright, username: str, password: str) -> None: diff --git a/nextcloud_docs_collaboration.py b/nextcloud_docs_collaboration.py index bf07b8ec..bf53c769 100644 --- a/nextcloud_docs_collaboration.py +++ b/nextcloud_docs_collaboration.py @@ -11,7 +11,7 @@ def get_random_text() -> str: return ''.join(random.choice(characters) for _ in range(size_in_bytes)) def log_note(message: str) -> None: - timestamp = round(time_ns() * 1000) + timestamp = str(time_ns())[:16] print(f"{timestamp} {message}") def collaborate(playwright: Playwright) -> None: diff --git a/nextcloud_install.py b/nextcloud_install.py index c97d511e..c91d80c3 100644 --- a/nextcloud_install.py +++ b/nextcloud_install.py @@ -3,7 +3,7 @@ from time import time_ns from playwright.sync_api import sync_playwright def log_note(message: str) -> None: - timestamp = round(time_ns() * 1000) + timestamp = str(time_ns())[:16] print(f"{timestamp} {message}") def main(): diff --git a/nextcloud_talk.py b/nextcloud_talk.py index e63e4bdd..7a762b85 100644 --- a/nextcloud_talk.py +++ b/nextcloud_talk.py @@ -5,7 +5,7 @@ from time import time_ns from playwright.sync_api import Playwright, sync_playwright, expect def log_note(message: str) -> None: - timestamp = round(time_ns() * 1000) + timestamp = str(time_ns())[:16] print(f"{timestamp} {message}") def get_random_text() -> str: