Skip to content

Commit 924bc62

Browse files
ES-Alexanderpatrickelectric
authored andcommitted
scripts: run_parsers: groundskeeper: fix missing timezone bug
1 parent b8c887d commit 924bc62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/run_parsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pathlib import Path
1212

1313
from packaging import version
14-
from datetime import datetime
14+
from datetime import datetime, timezone
1515

1616
class Groundskeeper:
1717
repository_url = 'https://github.com/ArduPilot/ardupilot'
@@ -102,7 +102,7 @@ def get_last_ground_change(repository: git.Repo|None = None):
102102

103103
# Determine last ground change of some other repo
104104
last_commit_date = repository.head.commit.committed_date
105-
return datetime.fromtimestamp(last_commit_date)
105+
return datetime.fromtimestamp(last_commit_date).astimezone(timezone.utc)
106106

107107
@staticmethod
108108
def get_vehicle_prefix(vehicle_type: str):

0 commit comments

Comments
 (0)