support/scripts/pkg-stats: fix datetime deprecation warning

Abide by the warning reported with python 3.12:

    .../support/scripts/pkg-stats:1289: 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).

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
Yann E. MORIN 2024-02-25 23:05:35 +01:00 committed by Arnout Vandecappelle
parent c7b52c3ccf
commit f71d9f49e5

View File

@ -1290,7 +1290,7 @@ def __main__():
package_list = set([v["name"] for v in show_info_js.values() if 'name' in v])
else:
package_list = None
date = datetime.datetime.utcnow()
date = datetime.datetime.now(datetime.UTC)
commit = subprocess.check_output(['git', '-C', brpath,
'rev-parse',
'HEAD']).splitlines()[0].decode()