diff --git a/tests/test_cisco_acs.py b/tests/test_cisco_acs.py index 19cf8b9..a26e19d 100644 --- a/tests/test_cisco_acs.py +++ b/tests/test_cisco_acs.py @@ -43,7 +43,7 @@ def time_operations(dt): # epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s') # Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK - # Trim last 3 digits of microsecond resolution to obtain milliseconds + # Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively epoch = dt.astimezone().strftime("%s.%f")[:-3] return iso, bsd, time, date, tzoffset, epoch diff --git a/tests/test_fortinet_ngfw.py b/tests/test_fortinet_ngfw.py index 6d63bc7..725934f 100644 --- a/tests/test_fortinet_ngfw.py +++ b/tests/test_fortinet_ngfw.py @@ -48,7 +48,7 @@ def time_operations(dt): # epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s') # Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK - # Trim last 3 digits of microsecond resolution to obtain milliseconds + # Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively epoch = dt.astimezone().strftime("%s.%f")[:-7] return iso, bsd, time, date, tzoffset, epoch diff --git a/tests/test_fortinet_web.py b/tests/test_fortinet_web.py index abc92b0..f62a298 100644 --- a/tests/test_fortinet_web.py +++ b/tests/test_fortinet_web.py @@ -47,7 +47,7 @@ def time_operations(dt): # epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s') # Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK - # Trim last 3 digits of microsecond resolution to obtain milliseconds + # Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively epoch = dt.astimezone().strftime("%s.%f")[:-7] return iso, bsd, time, date, tzoffset, epoch