suncalc
suncalc copied to clipboard
Sunset times are off for Australia
Hi there,
The follow code gives me the wrong sunrise and sunset times for eastern Australia; Google tells me sunset is at 17:38 AEST (UTC+10).
getSunlightTimes(date = ymd("2023-09-15"),
lat = 28.865, lon = 153.565,
tz = "Etc/GMT+10",
keep = c("sunrise", "sunset"))
date lat lon sunrise sunset
1 2023-09-15 28.865 153.565 2023-09-14 09:31:32 2023-09-14 21:53:54
Any idea what's going on?
Matt
Australia is in the Southern Hemisphere; latitude should be negative!
Hi, you're correct. -28.865, 153.565 still gives the wrong results.
date lat lon sunrise sunset
1 2023-09-15 -28.865 153.565 2023-09-14 09:46:16 2023-09-14 21:39:09
I've got the same problem as you. Change time zone of your computer.