Skip to content

Sunrise / sunset is incorrect for westerly timezones #491

@edwardspeyer

Description

@edwardspeyer

Sunrise and sunset are calculated by calling sun_rise_set for the UTC date instead of the local date. This means that the next pair of rise/set times may be for tomorrow instead of the upcoming sunset.

Example: The watch is in San Francisco and the local time is 6pm on October 31st. The sun will set in 12 minutes so the sunrise_sunset_face should show the next pair of events as being (1) the time of today's sunset (6:12pm Oct 31st) followed by (2) tomorrows sunrise (7:37am Nov 1st).

However, the date used for calculating the next rise/set times is based on the UTC time. The UTC time in the example is 7 hours ahead and already on November 1st. The face incorrectly shows the next pair of events as (1) an upcoming sunrise (7:37am Nov 1st) followed by (2) the next sunset (6:12pm Nov 1st).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions