diff --git a/docs/TECHNICAL_DETAILS.md b/docs/TECHNICAL_DETAILS.md index 483260b..3528e33 100644 --- a/docs/TECHNICAL_DETAILS.md +++ b/docs/TECHNICAL_DETAILS.md @@ -36,6 +36,7 @@ A decaying cache for __outgoing__ messages to the user is currently not implemen - Openstreetmap category data: - MPAD honors OSM's [Nominatim usage policy](https://operations.osmfoundation.org/policies/nominatim) by artificially delaying requests to OSM. Whenever you request OSM category data and you have requested more than one result, each follow-up request of that same command experiences an artificial delay between 1.2 and 3.0 seconds (random value). Therefore, requesting 5 results can take between 6 and 15 secs (excluding any additional delays for the outgoing APRS messages) - General: + - This program is single-threaded and will take care of one message at a time. Parallel processing of messages is not implemented. - APRS 'TOCALL' identifier is currently still set to default 'APRS' (see WXBOT implementation); in the long run, MPAD needs its own identifier (see http://www.aprs.org/aprs11/tocalls.txt) - Call signs which deviate from a 'normal' call sign pattern may not be recognised (e.g. APRS bot call signs etc) at all times. In this case, the program may not know what to do and will perform a fallback to its default mode: generate a wx report for the user's call sign. - Keyword-less requests or request data that was supplied in an incorrect manner is prone to misinterpretation. Mainly, that misinterpretation happens if you request a wx report for a city whose name consists of multiple parts - and you forget to specify state or country code. Example: a request for the German city of ```Bad Driburg``` (note the missing state/country data) would get misinterpreted as METAR request for the airport of Barksdale, LA (IATA code BAD / ICAO code KBAD). Specify the wx report in the official format (```Bad Driburg;de```) and you'll be fine. MPAD will notice the format qualifiers and -despite having a match on the valid IATA Code- will interpret the data as a Wx request. Nevertheless, other side effects may happen. diff --git a/src/aprsdotfi_modules.py b/src/aprsdotfi_modules.py index 8844266..d8b157e 100644 --- a/src/aprsdotfi_modules.py +++ b/src/aprsdotfi_modules.py @@ -116,7 +116,7 @@ def get_position_on_aprsfi(aprsfi_callsign: str, aprsdotfi_api_key: str): altitude = float(json_content["entries"][0]["altitude"]) if "lasttime" in json_content["entries"][0]: _mylast = float(json_content["entries"][0]["lasttime"]) - lasttime = datetime.fromtimestamp(_mylast) + lasttime = datetime.utcfromtimestamp(_mylast) return success, latitude, longitude, altitude, lasttime, aprsfi_callsign diff --git a/src/mpad_config.py b/src/mpad_config.py index 124bb46..efe3ee2 100644 --- a/src/mpad_config.py +++ b/src/mpad_config.py @@ -21,7 +21,7 @@ # # Program version # -mpad_version: str = "0.22" +mpad_version: str = "0.23" # ########################### # Constants, do not change# diff --git a/src/openweathermap_modules.py b/src/openweathermap_modules.py index 49b18da..139d940 100644 --- a/src/openweathermap_modules.py +++ b/src/openweathermap_modules.py @@ -219,7 +219,7 @@ def parse_daily_weather_from_openweathermapdotorg( # If we have a time stamp, then let's provide a real date to the user if "dt" in weather_tuple: w_dt = weather_tuple["dt"] - tmp_dt = datetime.fromtimestamp(w_dt) + tmp_dt = datetime.utcfromtimestamp(w_dt) when_text = datetime.strftime(tmp_dt, "%d-%b-%y") if "sunrise" in weather_tuple: w_sunrise = weather_tuple["sunrise"] @@ -321,19 +321,19 @@ def parse_daily_weather_from_openweathermapdotorg( # Sunrise and Sunset if w_sunset and w_sunrise: - tmp1 = datetime.fromtimestamp(w_sunrise) - tmp2 = datetime.fromtimestamp(w_sunset) + tmp1 = datetime.utcfromtimestamp(w_sunrise) + tmp2 = datetime.utcfromtimestamp(w_sunset) weather_forecast_array = make_pretty_aprs_messages( f"sunrise/set {tmp1.hour:02d}:{tmp1.minute:02d}/{tmp2.hour:02d}:{tmp2.minute:02d}UTC", weather_forecast_array, ) elif w_sunrise and not w_sunset: - tmp = datetime.fromtimestamp(w_sunrise) + tmp = datetime.utcfromtimestamp(w_sunrise) weather_forecast_array = make_pretty_aprs_messages( f"sunrise {tmp.hour}:{tmp.minute}UTC", weather_forecast_array ) elif w_sunset and not w_sunrise: - tmp = datetime.fromtimestamp(w_sunset) + tmp = datetime.utcfromtimestamp(w_sunset) weather_forecast_array = make_pretty_aprs_messages( f"sunset {tmp.hour}:{tmp.minute}UTC", weather_forecast_array )