Time and Chronos : I cant even compile the example sketches!

If this is the wrong section of the forum my apologies. I am struggling to categorise my question being an almost complete newbie to Arduino coding!

I have had limited success in the past and got to the point in the end where I was able to use an Arduino Due to multiplex two serial text string inputs, concatenate them and output them to third serial output as a single string

I now need to modify part of one of the strings - actually a date that needs to have 1024 weeks added to it to produce revised date

A search led me to two libraries: Time and Chronos

I have downloaded both libraries. The Time library required me to to also install Teensyduino in order to download the library. The Teensyduino required me to upgrade my Arduino version from 1.6.12 to 1.8.9

Having done all that I loaded one (well actually each in turn, or the four) sample sketches from Chronos and none will compile.

I simply have no idea where I am going wrong and the error messages are meaningless to me

Can anyone give me a clue? Theres no point me starting to try and code my own sketch if the samples will not compile and run!

Is it a board issue? Do I have to use a different board than a Due?

The original modified sketch still complies without problem.

Error messages from attempted compilation follow:-

In file included from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:34:0,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/Chronos.h:79,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/examples/TestPerf/TestPerf.ino:48:
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/../chronosinc/timeTypes.h:46:9: error: 'tmElements_t' does not name a type
 typedef tmElements_t TimeElements;
         ^
In file included from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/Chronos.h:79:0,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/examples/TestPerf/TestPerf.ino:48:
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:154:26: error: 'TimeElements' in namespace 'Chronos' does not name a type
  DateTime(const Chronos::TimeElements & atTime);
                          ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:353:24: error: 'TimeElements' in namespace 'Chronos' does not name a type
  inline const Chronos::TimeElements & asElements() const { return getElements();}
                        ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:379:18: error: 'TimeElements' in namespace 'Chronos' does not name a type
  inline Chronos::TimeElements & getElements() const {initElements(); return _elements;}
                  ^
In file included from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/Chronos.h:79:0,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/examples/TestPerf/TestPerf.ino:48:
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:383:19: error: 'TimeElements' in namespace 'Chronos' does not name a type
  mutable Chronos::TimeElements _elements;
                   ^
In file included from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/Chronos.h:79:0,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/examples/TestPerf/TestPerf.ino:48:
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Seconds Chronos::DateTime::second() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:181:55: error: 'getElements' was not declared in this scope
  inline Seconds  second()  const { return getElements().Second;}
                                                       ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Minutes Chronos::DateTime::minute() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:182:55: error: 'getElements' was not declared in this scope
  inline Minutes  minute()  const { return getElements().Minute;}
                                                       ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Hours Chronos::DateTime::hour() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:183:53: error: 'getElements' was not declared in this scope
  inline Hours  hour()    const { return getElements().Hour;}
                                                     ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Day Chronos::DateTime::day() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:184:51: error: 'getElements' was not declared in this scope
  inline Day  day()     const { return getElements().Day;}
                                                   ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::WeekDay Chronos::DateTime::weekday() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:185:54: error: 'getElements' was not declared in this scope
  inline WeekDay weekday() const { return getElements().Wday;}
                                                      ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Month Chronos::DateTime::month() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:186:52: error: 'getElements' was not declared in this scope
  inline Month month()   const { return getElements().Month;}
                                                    ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'Chronos::Year Chronos::DateTime::year() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:187:69: error: 'getElements' was not declared in this scope
  inline Year  year()    const { return tmYearToCalendar(getElements().Year);}
                                                                     ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:187:75: error: 'tmYearToCalendar' was not declared in this scope
  inline Year  year()    const { return tmYearToCalendar(getElements().Year);}
                                                                           ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h: In member function 'void Chronos::DateTime::initElements() const':
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:380:33: error: '_elements' was not declared in this scope
  void initElements() const {if (_elements.Year || _elements.Month) {return;} DATETIME_CONVERT_EPOCH_INTO_TIMELEMENTS(epoch, _elements); }
                                 ^
In file included from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/../chronosinc/platform/timesource.h:36:0,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:38,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/Chronos.h:79,
                 from /Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/examples/TestPerf/TestPerf.ino:48:
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/../chronosinc/platform/../../chronosinc/platform/timesourceTimelib.h:39:2: error: '::breakTime' has not been declared
  ::breakTime(epoch, elements);
  ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:380:78: note: in expansion of macro 'DATETIME_CONVERT_EPOCH_INTO_TIMELEMENTS'
  void initElements() const {if (_elements.Year || _elements.Month) {return;} DATETIME_CONVERT_EPOCH_INTO_TIMELEMENTS(epoch, _elements); }
                                                                              ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/DateTime.h:380:125: error: '_elements' was not declared in this scope
  void initElements() const {if (_elements.Year || _elements.Month) {return;} DATETIME_CONVERT_EPOCH_INTO_TIMELEMENTS(epoch, _elements); }
                                                                                                                             ^
/Users/graeme/Documents/Arduino/libraries/Chronos-1.2.0/src/chronosinc/../chronosinc/platform/../../chronosinc/platform/timesourceTimelib.h:39:21: note: in definition of macro 'DATETIME_CONVERT_EPOCH_INTO_TIMELEMENTS'
  ::breakTime(epoch, elements);

skyflyer: The Time library required me to to also install Teensyduino in order to download the library.

This is incorrect. It's true that the Teensyduino installation allows you to install the Time library at the same time, but this is certainly not the only way to install the Time library. It's quite readily available for easy installation via the Arduino IDE's Library Manager (Sketch > Include Library > Manage Libraries). Well, no harm done.

skyflyer: Error messages from attempted compilation follow:

This is a very common problem when using the Time library on a filename case-insensitive operating system. The problem is that the newer toolchain versions contain a file named time.h. The #include directive for the Time.h in the Time library ends up including the time.h file instead. To deal with this problem, the author of the Time library added a new file named TimeLib.h. So the problem is solved by simply changing:

#include 

to:

#include 

Sadly, some authors of libraries or sketches that use the Time library still have not made this important change. That is the case with the Chronos library, despite someone having submitted a pull request to fix this almost a year ago: https://github.com/psychogenic/Chronos/pull/8

So you just need to change the #include directive in the example sketches from Time.h to TimeLib.h and the problem will be solved.