Qcomgpsd: Dont use system timezone (#30508)

old-commit-hash: 8e883669556c5dcd045d5b6e182f7524f76e800a
This commit is contained in:
Harald Schäfer
2023-11-21 14:12:39 -05:00
committed by GitHub
parent ef707d3226
commit f77e9dfd7d

View File

@@ -379,7 +379,7 @@ def main() -> NoReturn:
gps.bearingDeg = report["q_FltHeadingRad"] * 180/math.pi
# TODO needs update if there is another leap second, after june 2024?
dt_timestamp = (datetime.datetime(1980, 1, 6, 0, 0, 0, 0, None) +
dt_timestamp = (datetime.datetime(1980, 1, 6, 0, 0, 0, 0, datetime.timezone.utc) +
datetime.timedelta(weeks=report['w_GpsWeekNumber']) +
datetime.timedelta(seconds=(1e-3*report['q_GpsFixTimeMs'] - 18)))
gps.unixTimestampMillis = dt_timestamp.timestamp()*1e3