This simple webapp uses your local time, your browser's location API, and SunCalc.js, to determine if it's dark outside.

See the source code on Github.