Qcomgpsd: Dont use system timezone (#30508)

pull/30483/head^2
Harald Schäfer 1 year ago committed by GitHub
parent afd61352d0
commit 8e88366955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      system/qcomgpsd/qcomgpsd.py

@ -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

Loading…
Cancel
Save