Why are you doing time math in local time?
Simply do all the time math in universal time and be done with it.