 };
 
 
-ClockTime operator+(ClockTime lhs, int minutes) { 
-    lhs.minute+=minutes;
-    lhs.fixTime();
-    return lhs;
-}
-
-  
+ClockTime operator+(ClockTime lhs, int minutes) {
+  lhs.minute += minutes;
+  lhs.fixTime();
+  return lhs;
+}
+
+
 bool operator<(ClockTime lhs, ClockTime rhs) {
   if (lhs.hour < rhs.hour) {
     return true;

  if (!alarmActive)
  {
    setColorForSunRise();
    alarmStartMillis = static_cast<unsigned long>(millis()-1000*seconds);
    alarmActive = true;
  }
  if (seconds >= thirtyminutes) {
    linearBrightOfStep(totalDimmerSteps);
    return;
  }
  if (seconds == thirtyminutes && !sfx_playing) {
    sfx_playing = sfx.playTrack("WAKE.OGG");
  }
  logisticBrightOfMilliseconds(static_cast<unsigned long>(millis()-alarmStartMillis));
}


void updateTime(ClockTime & t, int16_t delta) {
  t.minute += delta;
  updateTimeDisplay(t,true,alarmMasterSwitchEnabled);
}

void updateAlarm(int16_t delta) {
  alarmTime += delta;
  updateTimeDisplay(alarmTime,true,alarmMasterSwitchEnabled);
}


void setTime() {
  analogWrite(TimeLED,matrixBrightness*255/16+15);
  DateTime currentTime = RTC.now();
  ClockTime t(currentTime);
  display_Cloc();
  delay(1000);
  updateTimeDisplay(t,true,alarmMasterSwitchEnabled);
  waitForButtonDepress(TimeButton, LOW);
  unsigned long modeActive = millis();
  bool normalExit = true;
  while (debounceDigitalRead(TimeButton)==HIGH) {
    int16_t encoderDelta = encoder->getValue();
    updateTime(t,encoderDelta);
    modeActive = millis();
    if (static_cast<unsigned long>(millis() - modeActive) > modeInactivePeriod) {
      normalExit = false;

  updateCurrentTime(true);
  readAlarmTimeFromEEPROM();
  updateStartTime();
  //Serial.println("Finished setup!");
  //  turnLightOn();
  //  delay(1000);
  //  turnLightOff();
}

int32_t secondsBtwDates(ClockTime currentTime, ClockTime alarm) {
  int32_t s = (currentTime.hour - alarm.hour);
  s *= 3600;
  s += (currentTime.minute - alarm.minute) * 60;
  s += (currentTime.second - alarm.second);
  //Serial.print("Seconds between dates:  currentTime = ");
  //Serial.print(currentTime.hour);
