Skip to content

Commit ea70ea5

Browse files
committed
warning cleanup
1 parent 64fe1e5 commit ea70ea5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/add_new_contribution_to_yaml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
given properties, add a new contribution to the contributions.yaml database file.
33
"""
4-
from datetime import datetime
4+
from datetime import datetime, UTC
55
import json
66
import pathlib
77
from sys import argv
@@ -39,7 +39,7 @@
3939

4040
# append new contribution with next index
4141
# add status, at top
42-
datetime_today = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S%z')
42+
datetime_today = datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S%z')
4343
contribution = {
4444
'id': max_index + 1,
4545
'status': 'VALID',

scripts/fetch_updates.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Reads in the contributions.yaml file, and updates the entries by hitting the 'source' url.
33
"""
44
import argparse
5-
from datetime import datetime
5+
from datetime import datetime, UTC
66
import pathlib
77
from ruamel.yaml import YAML
88
from multiprocessing import Pool
@@ -11,7 +11,7 @@
1111

1212

1313
def update_contribution(contribution, props):
14-
datetime_today = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S%z')
14+
datetime_today = datetime.now(UTC).strftime('%Y-%m-%dT%H:%M:%S%z')
1515
contribution['lastUpdated'] = datetime_today
1616
if 'previousVersions' not in contribution:
1717
contribution['previousVersions'] = []
@@ -40,7 +40,7 @@ def log_broken(contribution, msg):
4040
contribution['log'].append(msg)
4141

4242
def process_contribution(contribution):
43-
date_today = datetime.utcnow().strftime('%Y-%m-%d')
43+
date_today = datetime.now(UTC).strftime('%Y-%m-%d')
4444
this_version = '0'
4545

4646
if contribution['status'] != 'DEPRECATED':

0 commit comments

Comments
 (0)