-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When the timezone is ahead of UTC, the retrieved sunrise and sunset times are calculated for the incorrect date, causing a one-day shift.
Steps To Reproduce
- Input a datetime in a timezone that is ahead of UTC (e.g.,
Asia/Tokyo (JST)
). - Example: Provide
January 1st, 00:00 JST
. - Internally, this is converted to
December 31st, 15:00 UTC
. - The time component is then discarded, and only the date is used for sunrise/sunset calculation.
- As a result, the calculation is performed for
December 31st
instead ofJanuary 1st
.
Expected Behavior
The sunrise and sunset times should be calculated for the intended local date (January 1st in this example).
Screenshots
...
Additional Context
https://github.com/bluefireteam/daylight/blob/3.1.0/lib/src/daylight.dart#L157-L158
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working