RTC resets on Arduino reset

Every time I reset my arduino, the year goes to 2106, and I don't know why...

// Date and time functions using just software, based on millis() & timer

#include <Wire.h>
#include "RTClib.h"

RTC_Millis rtc;

void setup () {
    Serial.begin(9600);
    // following line sets the RTC to the date & time this sketch was compiled
    if(rtc.now().year() != "2017"){
      Serial.println(rtc.now().year());
      rtc.begin(DateTime(__DATE__, __TIME__));
    }
    //
}

void loop () {
    DateTime now = rtc.now();
    
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
    
    Serial.print(" seconds since 1970: ");
    Serial.println(now.unixtime());
    
    // calculate a date which is 7 days and 30 seconds into the future
    
    Serial.println();
    delay(3000);
}
------------------
/*SERIAL MONITOR*/
------------------
*presses reset button*

2106 //year reset???
2017/9/23 16:27:32 //resetting to upload time

Not sure which library you use but I would start by looking at the type of value returned by year() and read about string comparisons (if your lib does not return an instance of the String class)

    if(rtc.now().year() [color=red]!= "2017"[/color]){

in the library I know, this is how year() is defined  uint16_t year() const      { return 2000 + yOff; } in the class DateTime (so returns an unsigned int on 16 bits)

Always break the program down into the minimum needed to create the problem. Remove your IF test in setup() and you should see the problem.