plugins/nightlight: Guard against invalid timings in the config
Morning and evening timings should be ordered correctly. When computing the daylight duration, that ternary operator should not be needed and it hides other bugs.
(cherry picked from commit 786b3ffb)