The first problem is that sunrise/sunset can vary by several hours from the local timezone - e.g., when traveling to Australia, or even China (which has one timezone for the whole country). We tried to make this automatic in our first version in 2009 and gave it up, because people wanted it to be much closer to actual sunrise/sunset. (The system time widget does not tell us the location of the machine, but only the timezone offset, so macOS/Apple know this but we don't get it automatically.)
f.lux tries to know your location within about 5 miles (rather than exactly for privacy reasons), and it does prompt when your timezone changes - we could work on making it more seamless, but there are privacy implications with making it too quiet.