From 1894a312d350f6d2ec6ad79effb84a6b2e4266eb Mon Sep 17 00:00:00 2001 From: Nayan Date: Sun, 31 Aug 2025 02:46:20 -0400 Subject: [PATCH] Bug: Fix OSM Download Time & ETA (#1194) fix osm download time --- sunnypilot/mapd/mapd_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sunnypilot/mapd/mapd_manager.py b/sunnypilot/mapd/mapd_manager.py index 9ebf07a7f..1211c1ecc 100755 --- a/sunnypilot/mapd/mapd_manager.py +++ b/sunnypilot/mapd/mapd_manager.py @@ -6,11 +6,11 @@ This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ import json -import time import platform import os import glob import shutil +from datetime import datetime from openpilot.common.params import Params from openpilot.common.realtime import Ratekeeper, config_realtime_process @@ -56,7 +56,7 @@ def cleanup_old_osm_data(files_to_remove: list[str]) -> None: def request_refresh_osm_location_data(nations: list[str], states: list[str] = None) -> None: - params.put("OsmDownloadedDate", str(time.monotonic())) + params.put("OsmDownloadedDate", str(datetime.now().timestamp())) params.put_bool("OsmDbUpdatesCheck", False) osm_download_locations = {