Sunrise/Sunset Time flaky

I have a simple app that turns on a light at 15 minutes before sunset and turns it off at sunrise. When I load the app, hit done, then look at the schedule it is exactly what I want. But the next day it seems to reverse things. It sets the schedule for sunset and 15 minutes before sunrise. I can go into the app, hit done and it will correct back to the correct times.Here is the code. Can anyone explain why it would do this?

def initialize() {

//Control Routines

def scheduleSetHandler(evt) {
def riseAndSet = getSunriseAndSunset(sunsetOffset: -15)
log.debug riseAndSet.sunrise
log.debug riseAndSet.sunset
schedule (riseAndSet.sunrise, sunriseHandler)
schedule (riseAndSet.sunset, sunsetHandler)

def sunriseHandler(evt) {

def sunsetHandler(evt) {