Closed rhl- closed 4 years ago
Hello @rhl- I get your points, let me try to explain
Observation objects are a PyOWM abstraction - which builds upon the concepts of Location and Weather being provided by the OpenWeatherMap API. Basically:
OBSERVATION = TIMESTAMP + LOCATION + WEATHER
here the TIMESTAMP
refers to when the weather data has been fetched from OWM by PyOWM. Such a timestamp may differ from the one related to the embedded Weather object:
As per OWM API docs, this latter timestamp refers Time of data calculation, unix, UTC
So the two timestamps mean different things, and on purpose, as they mean different things
As per your second point, you're right - thanks for notifying!
Hi,
I noticed that:
You appear to use this: https://github.com/csparpa/pyowm/blob/a5d8733412168516f869c84600812e0046c209f9/pyowm/weatherapi25/parsers/observationparser.py#L66
as your "reference time".
However, it appears that the OpenWeatherMap API itself provides an epoch timestamp for when the data was recorded by them as the field
dt
in it's spec.That
dt
timestamp is clearly more relevant as that is truly when the OWM server timestamps the weather data.Also, I am not sure what the value is in forcing the user to round the nanos since epoch time?