summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-11-15 22:05:52 -0500
committerfigsoda <figsoda@pm.me>2023-11-15 22:23:30 -0500
commit7805a7a88fd0fb13b4bedc22e08a11f705cb24ce (patch)
tree2b9e26820ccbc658c17a0a7903d0d438fe2075b3 /maintainers
parenteb491233cd74eb8a3642ca459ab672390ed02222 (diff)
downloadnixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar.gz
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar.bz2
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar.lz
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar.xz
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.tar.zst
nixpkgs-7805a7a88fd0fb13b4bedc22e08a11f705cb24ce.zip
pluginupdate.py: format date differently
- use %Y-%m%d
- use UTC instead of local time
Diffstat (limited to 'maintainers')
-rw-r--r--maintainers/scripts/pluginupdate.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py
index 44a445875d9..cc0f4ef742d 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)