summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2023-09-16 09:36:49 +0200
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-09-18 23:59:37 +0000
commitaadd12cb08bede15946bc790f6005bbe120c17bc (patch)
treeec31d207c9a1985171a27bdef48840c46e52bb8d /repo
parentb8fd19215f59f7f8dbe69528aefca700a2190ecd (diff)
downloadgit-repo-aadd12cb08bede15946bc790f6005bbe120c17bc.tar.gz
Use non-deprecated API for obtaining UTC time
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). Change-Id: Ia2c46fb87c544d98cc2dd68a829f67d4770b479c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386615 Tested-by: Łukasz Patron <priv.luk@gmail.com> Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Łukasz Patron <priv.luk@gmail.com> Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-xrepo4
1 files changed, 2 insertions, 2 deletions
diff --git a/repo b/repo
index d2a4df2e..7f24ff1e 100755
--- a/repo
+++ b/repo
@@ -173,7 +173,7 @@ if not REPO_REV:
173BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" 173BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071"
174 174
175# increment this whenever we make important changes to this script 175# increment this whenever we make important changes to this script
176VERSION = (2, 36) 176VERSION = (2, 37)
177 177
178# increment this if the MAINTAINER_KEYS block is modified 178# increment this if the MAINTAINER_KEYS block is modified
179KEYRING_VERSION = (2, 3) 179KEYRING_VERSION = (2, 3)
@@ -838,7 +838,7 @@ def SetGitTrace2ParentSid(env=None):
838 838
839 KEY = "GIT_TRACE2_PARENT_SID" 839 KEY = "GIT_TRACE2_PARENT_SID"
840 840
841 now = datetime.datetime.utcnow() 841 now = datetime.datetime.now(datetime.timezone.utc)
842 value = "repo-%s-P%08x" % (now.strftime("%Y%m%dT%H%M%SZ"), os.getpid()) 842 value = "repo-%s-P%08x" % (now.strftime("%Y%m%dT%H%M%SZ"), os.getpid())
843 843
844 # If it's already set, then append ourselves. 844 # If it's already set, then append ourselves.