From: Douglas Bagnall Date: Fri, 23 Feb 2024 03:23:03 +0000 (+1300) Subject: python/nt_time: have a go at using 1_000_000 number separators. X-Git-Tag: tdb-1.4.11~1646 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00daa520ce80deb76e08684b3f9b3f22202bcd2c;p=thirdparty%2Fsamba.git python/nt_time: have a go at using 1_000_000 number separators. I noticed these are available in Python 3.6+, which is what we support, and they're arguably nicer than using exponentiation. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/nt_time.py b/python/samba/nt_time.py index 347ff5ad7f0..496dde576b4 100644 --- a/python/samba/nt_time.py +++ b/python/samba/nt_time.py @@ -28,7 +28,7 @@ NtTimeDelta = NewType("NtTimeDelta", int) NT_EPOCH = datetime.datetime(1601, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc) NT_TICKS_PER_μSEC = 10 -NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 10**6 +NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 1_000_000 def _validate_nt_time(nt_time: NtTime) -> None: