Open
Description
Using getTimes
for some coordinates (close to a TZ border) and times close to but before midnight appears to produce an incorrect sunset time that is on the following day.
To reproduce, call getTimes with:
{
time: new Date('2022-04-14T23:40:15.817+08:00')
lat: -14.414989274961663,
lon: 128.52523583273717,
timezone: 'Australia/Perth'
}
I get back:
{
times: {
solarNoon: 2022-04-15T03:27:08.981Z,
nadir: 2022-04-14T15:27:08.981Z,
sunrise: 2022-04-14T21:33:37.354Z,
sunset: 2022-04-15T09:20:40.607Z,
sunriseEnd: 2022-04-14T21:35:51.374Z,
sunsetStart: 2022-04-15T09:18:26.587Z,
dawn: 2022-04-14T21:12:00.824Z,
dusk: 2022-04-15T09:42:17.137Z,
nauticalDawn: 2022-04-14T20:47:00.521Z,
nauticalDusk: 2022-04-15T10:07:17.441Z,
nightEnd: 2022-04-14T20:22:04.702Z,
night: 2022-04-15T10:32:13.259Z,
goldenHourEnd: 2022-04-14T22:02:20.087Z,
goldenHour: 2022-04-15T08:51:57.875Z
}
}
converted to local date strings for Australia/Perth
TZ
sunrise: '15/04/2022, 07:33:37'
sunset: '15/04/2022, 19:20:40'
Metadata
Assignees
Labels
No labels
Activity