DS1307 time to int?

There uis s difference in how you are getting the value now.year() and (now.year). If the first version works, then use that.

  Serial.println(now.year(), DEC);
  int tyear = (now.year);