psychogenic / Chronos

Easily manipulate date-times to perform scheduling, setup calendars and find points in time that are of interest.
GNU Lesser General Public License v3.0
10 stars 11 forks source link

Solve compilation issues on latest arduino and esp8266 #8

Open MarcFinns opened 6 years ago

MarcFinns commented 6 years ago

added #include

per1234 commented 4 years ago

Fixes https://github.com/psychogenic/Chronos/issues/5

Note this issue only occurs on filename case-insensitive operating systems like Windows. time.h ends up being #included instead of Time.h. For this reason, a unique filename TimeLib.h was added to the Time library: https://github.com/PaulStoffregen/Time/commit/26cd0c85095d5dbfffded0831abb2f7abaad0469

hlovdal commented 2 years ago

And not only was TimeLib.h added a long time ago, the Time.h wrapper was removed last year.

However this pull request is not correct, it should not add TimeLib.h unconditionally, it should replace Time.h inside the ifdef like the following:

@@ -40,7 +40,7 @@
 #endif

 #ifdef CHRONOS_CLOCKSOURCE_TIMELIB
-#include <Time.h>
+#include <TimeLib.h>
 #endif

@MarcFinns Do you want to update this PR, or should I make a new one?