New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LocalTimeConstraint does not consider local time-zone #466
Comments
This snippet
prints |
Uh... At 20:00 astropy.time says it corresponds to Julian Day |
Hi @Lagrang3 , see the astropy time notes about location. Basically the timezones only work in certain situations and when converting between different scales. We choose to just always use UTC for working with any dates or times and only convert it to a local time for final display purposes or initial input. |
Hi @wtgee, thank you for the clarification. Then I must assume that the
is meant UTC. Then what do you make up of this:
printing |
In my opinion some of the constraint classes are interpreting the time in the input |
In fact in the code the |
I don't use the LocalTimeConstraint, but it's odd that the astroplan/astroplan/constraints.py Line 762 in 7a894ac
|
You beat me to it. ;) |
Here's a full example.
it should print
|
AltitudeConstraint
does not consider DST (daylight saving time).For instance consider the following code:
It determines whether Aldebaran is visible above 20 deg. on the evening of 2020-04-10.
In Stellarium at that time the star is above 25 deg. and at 22:00 the star is below the 20 deg.
However the code returns
False
after 20:00. When it should beTrue
until 21:00.I am running anaconda on Linux:
The text was updated successfully, but these errors were encountered: