summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2025-01-15 22:36:29 -0800
committerWayne Davison <wayne@opencoder.net>2025-01-15 22:36:29 -0800
commit89b847393f53e24c38097153fc8568b85d07289c (patch)
tree427fd0414ca5452dd26a55e3dd8ba63882db6cd4
parent788ecbe5ea952bbe1498c654506264a0c4bf0ef5 (diff)
Fix python deprecation warning.
-rwxr-xr-xsupport/git-set-file-times4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/git-set-file-times b/support/git-set-file-times
index e06f0737..601248b9 100755
--- a/support/git-set-file-times
+++ b/support/git-set-file-times
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import os, re, argparse, subprocess
-from datetime import datetime
+from datetime import datetime, UTC
NULL_COMMIT_RE = re.compile(r'\0\0commit [a-f0-9]{40}$|\0$')
@@ -74,7 +74,7 @@ def print_line(fn, mtime, commit_time):
if args.list > 1:
ts = str(commit_time).rjust(10)
else:
- ts = datetime.utcfromtimestamp(commit_time).strftime("%Y-%m-%d %H:%M:%S")
+ ts = datetime.fromtimestamp(commit_time, UTC).strftime("%Y-%m-%d %H:%M:%S")
chg = '.' if mtime == commit_time else '*'
print(chg, ts, fn)