Library name ambiguity: Time v TimeLib

This is the library.properties file of a library ambiguously called 'Time'

name=Time
version=1.6.1
author=Michael Margolis
maintainer=Paul Stoffregen
sentence=Timekeeping functionality for Arduino
paragraph=Date and Time functions, with provisions to synchronize to external time sources like GPS and NTP (Internet).  This library is often used together with TimeAlarms and DS1307RTC.
category=Timing
url=http://playground.arduino.cc/Code/Time/
includes=TimeLib.h
architectures=*

Its location is C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries\Time\library.properties
A library in my sketch is <TimeLib.h>. I added it via IDE 1.8.19 > Sketch > Include Library > Time. (There is no 'TimeLib' in any section of the list).
I was looking for TimeLib.h, so now duly found in 'Time'.

But presumably such inconsistency is not confined to this one case. How does it arise? Is it a mere 'cosmetic' quirk with no programming consequences?

Go to you sketch folder and look into the "libraries" folder. Remove everything that you don't need.
To be sure which folder is used as your sketch folder, go to the Preferences and see what the "Sketchbook location" is.
Then in the Arduino IDE Version 2, use the "Library Manager" to install the libraries that you need.
The "TimeLib" (as I call it) is officially called: Time by Michael Margolis.
It should have been called "TimeLib" of course, but it isn't.

Version 1.8.19 also has a "Library Manager".

The library originally used Time.h, but that caused confusion with the C library file time.h on operating systems with file systems that are not case-sensitive.

1 Like

Thanks both, understood.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.