Open alexiosgkikas opened 9 months ago
Hi, this is a shortcoming of the automatic code generator. Sunrise and set values are stored as 64-bit integers. Below the corrected code to get the correct values. Support for automatic code generation will follow at some point
daily_sunrise = daily.Variables(0).ValuesInt64AsNumpy()
daily_sunset = daily.Variables(1).ValuesInt64AsNumpy()
Hi, i use the code that you provided.
The results of data about sunrise and sunset are as follow: [1724126298 1724212798 1724299297 1724385797 1724472297 1724558798, 1724645298].
How do I get a normal sunrise time like ["2024-02-22T16:30", ...]?
Those are unix timestamps which you can convert using datetime functions
By running the previous snippet of code it prints the below results.
Question: Is this the expected behavior or should it return a list of values for each variable(i.e ["2024-02-22T16:30", ...])?
It was tested in Python version 3.11.7, with the below libraries: openmeteo_requests==1.2.0 openmeteo_sdk==1.10.0