Open nmaslarinos opened 10 months ago
I finally managed to figure out the problem, it's because of the lack of timezone info provided. Should I update any datetime object with timezone information, all calculations are the same. Maybe some reference to the need for localised time would help others as well
it's because of the lack of timezone info provided
In bold, the docs say
Datetime must be in UTC.
So you probably need to convert the times to UTC initially and then convert the output to your localized location. Any docs updates are welcome
When using DataFrame arguments in the
get_positions
functions, the resulting solar positions are shifted by one hour compared to calling the function in a loop with singulardatetime
arguments. I double-checked the validity of the results using sunclac. The mistake appears to be in theto_milliseconds
function.Here's the code for the singular
datetime
loop:and here is the code creating a DataFrame and passing its elements as arguments:
The first snippet returns the following results:
while the second one returns the following: