diff options
author | Wayne Davison <wayne@opencoder.net> | 2025-01-15 22:36:29 -0800 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2025-01-15 22:36:29 -0800 |
commit | 89b847393f53e24c38097153fc8568b85d07289c (patch) | |
tree | 427fd0414ca5452dd26a55e3dd8ba63882db6cd4 | |
parent | 788ecbe5ea952bbe1498c654506264a0c4bf0ef5 (diff) |
Fix python deprecation warning.
-rwxr-xr-x | support/git-set-file-times | 4 |
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) |