From 21d107fedffdc3f5420fbb65df68306441ab70c7 Mon Sep 17 00:00:00 2001 From: Marcel Guzik Date: Wed, 21 Jan 2026 14:12:07 +0100 Subject: [PATCH] Use milliseconds by default in `Get Unix Timestamp` As shown in https://github.com/thin-edge/thin-edge.io/issues/3935, there are many opportunities for subtle errors when precision from the timestamp is discarded, so it would be better for the default to return as precise timestamp as possible, with a possibility to return a less precise timestamp if desired (very rarely). --- DeviceLibrary/DeviceLibrary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeviceLibrary/DeviceLibrary.py b/DeviceLibrary/DeviceLibrary.py index 35ec069..f4917c6 100644 --- a/DeviceLibrary/DeviceLibrary.py +++ b/DeviceLibrary/DeviceLibrary.py @@ -208,7 +208,7 @@ def get_suite_start_time(self) -> Optional[datetime]: return self.suite_start_time @keyword("Get Unix Timestamp") - def get_unix_timestamp(self, milliseconds: bool = False) -> Union[int, float]: + def get_unix_timestamp(self, milliseconds: bool = True) -> Union[int, float]: """Get the unix timestamp of the device (number of seconds since 1970-01-01). This returns the unix timestamp of the device under test, not the host where the test is being called from.