diff options
author | LuK1337 <priv.luk@gmail.com> | 2023-09-16 09:36:49 +0200 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-18 23:59:37 +0000 |
commit | aadd12cb08bede15946bc790f6005bbe120c17bc (patch) | |
tree | ec31d207c9a1985171a27bdef48840c46e52bb8d /repo | |
parent | b8fd19215f59f7f8dbe69528aefca700a2190ecd (diff) | |
download | git-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-x | repo | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -173,7 +173,7 @@ if not REPO_REV: | |||
173 | BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" | 173 | BUG_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 |
176 | VERSION = (2, 36) | 176 | VERSION = (2, 37) |
177 | 177 | ||
178 | # increment this if the MAINTAINER_KEYS block is modified | 178 | # increment this if the MAINTAINER_KEYS block is modified |
179 | KEYRING_VERSION = (2, 3) | 179 | KEYRING_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. |