From 9be4ceeaa10f6ed92291e77ec52794acfb67c147 Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Tue, 23 Apr 2024 15:37:37 -0400 Subject: [PATCH] Fix datetime.utcnow() deprecation warning Running stack.sh on a python 3.12 system generates this warning from worlddump.py: DeprecationWarning: datetime.datetime.utcnow() is deprecated Use datetime.now(timezone.utc) instead, which should be backwards-compatible with older python versions. TrivialFix Change-Id: I11fe60f6b04842412045c6cb97f493f7fef66e1a --- tools/worlddump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/worlddump.py b/tools/worlddump.py index aadd33b634..edbfa268db 100755 --- a/tools/worlddump.py +++ b/tools/worlddump.py @@ -51,7 +51,7 @@ def get_options(): def filename(dirname, name=""): - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) fmt = "worlddump-%Y-%m-%d-%H%M%S" if name: fmt += "-" + name