From 5f8758420c8f277aff627c4bfa698fbe1b73f6b0 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Wed, 4 Nov 2026 09:02:32 +0700 Subject: [PATCH] support: Use a kwarg for datetime.fromtimestamp This is how it's documented, cf. * https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp * https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp Quoting from the doc: > the recommended way to create an object representing a specific > timestamp in UTC is by calling datetime.fromtimestamp(timestamp, > tz=timezone.utc). This is just a nit, it doesn't _fix_ anything, it's just better style IMO. --- support/git-set-file-times | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/git-set-file-times b/support/git-set-file-times index 343c2c11c..7c303364b 100755 --- a/support/git-set-file-times +++ b/support/git-set-file-times @@ -81,7 +81,7 @@ def print_line(fn, mtime, commit_time): if args.list > 1: ts = str(commit_time).rjust(10) else: - ts = datetime.fromtimestamp(commit_time, timezone.utc).strftime("%Y-%m-%d %H:%M:%S") + ts = datetime.fromtimestamp(commit_time, tz=timezone.utc).strftime("%Y-%m-%d %H:%M:%S") chg = '.' if mtime == commit_time else '*' print(chg, ts, fn)