in the code below I have set the end date to 2021-6-6, but returned data ends on 2020-12-31.
from datetime import datetime
from meteostat import Point, Hourly
start = datetime(2018, 1, 1)
end = datetime(2021, 6, 6)
print(end)
vancouver = Point(49.2497, -123.1193, 70)
data = Hourly(vancouver, start, end)
data = data.fetch()
print(data)
Output:
and if I set end date to 2022-6-6, this script will return data ending on 2021-12-31.
So it works a bit as if the end date was rounded down with respect to the year.
Interesting is that the problem only affects dates above 2020. For end dates: 2020-6-6, 2019-6-6 and 2018-6-6 script works ok.
Hi,
in the code below I have set the end date to 2021-6-6, but returned data ends on 2020-12-31.
Output:
and if I set end date to 2022-6-6, this script will return data ending on 2021-12-31. So it works a bit as if the end date was rounded down with respect to the year.
Interesting is that the problem only affects dates above 2020. For end dates: 2020-6-6, 2019-6-6 and 2018-6-6 script works ok.