diff options
author | figsoda | 2023-11-16 22:08:21 -0500 |
---|---|---|
committer | GitHub | 2023-11-16 22:08:21 -0500 |
commit | 032090d2164f20218a247578ad5b1538afad58e4 (patch) | |
tree | 80f15f967a1a42b863dfdd0c3a6e886bb11c2571 /maintainers/scripts | |
parent | ec726b697d6cb081338810c36c076ff7459ef663 (diff) | |
parent | 7805a7a88fd0fb13b4bedc22e08a11f705cb24ce (diff) |
Merge pull request #267794 from figsoda/up-date
pluginupdate.py: format date differently
Diffstat (limited to 'maintainers/scripts')
-rw-r--r-- | maintainers/scripts/pluginupdate.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py index 44a445875d91..cc0f4ef742d1 100644 --- a/maintainers/scripts/pluginupdate.py +++ b/maintainers/scripts/pluginupdate.py @@ -26,7 +26,7 @@ import urllib.parse import urllib.request import xml.etree.ElementTree as ET from dataclasses import asdict, dataclass -from datetime import datetime +from datetime import UTC, datetime from functools import wraps from multiprocessing.dummy import Pool from pathlib import Path @@ -788,14 +788,12 @@ def update_plugins(editor: Editor, args): autocommit = not args.no_commit if autocommit: - from datetime import date - try: repo = git.Repo(os.getcwd()) - updated = date.today().strftime('%m-%d-%Y') + updated = datetime.now(tz=UTC).strftime('%Y-%m-%d') print(args.outfile) commit(repo, - f"{editor.attr_path}: updated the {updated}", [args.outfile] + f"{editor.attr_path}: update on {updated}", [args.outfile] ) except git.InvalidGitRepositoryError as e: print(f"Not in a git repository: {e}", file=sys.stderr) |