-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Very rarely SwiftAA will not make Sun events available for particular locations. Possibly for other bodies too?
This has occurred for me when using the method
RiseTransitSetTimes(
celestialBody: cb,
geographicCoordinates: geo
)
A test case is trying to get the sunset time in Chicago, USA on Sept 15, 2025.
I believe but have not confirmed at all that the root cause is that the local time in Chicago is such that there are two sunsets on this particular day when calculating in the UTC timezone. I believe that SwiftAA will calculate the sunset times in Chicago, finding that there is one on the 14th Sept UTC just after midnight UTC. It will/would find a second sunset just before midnight on the same day, 14th September UTC. SwiftAA will only ever return the first sunset on a particular day UTC for a location, so the first sunset is always returned. The second sunset is always ignored. As such, the first sunset is the sunset for Chicago on the 14th September 2025 Chicago time. The second sunset is the sunset for Chicago on the 15th September 2025 Chicago time. As such the second sunset for Chicago, the 15th September Chicago time is ignored and I believe is not available from SwiftAA.
This is just my findings from this morning, I haven't verified with code or such at the moment. Thank you.