followed directions perfectly but still timelibh no such file error

Arduino: 1.8.3 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Users\Bostonvet\Documents\Arduino\libraries\Step_One\Step_One.ino:11:21: fatal error: TimeLib.h: No such file or directory

#include <TimeLib.h>


compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.


  • SetRTCtoUTC
  • Adapted from WorldClock example from the Timezone library examples.


#include <DS1307RTC.h>
#include <Wire.h>
#include <Time.h> //
#include <TimeLib.h>
#include <Timezone.h> //

#pragma GCC diagnostic ignored “-Wwrite-strings”

TimeChangeRule usEDT = {“EDT”, First, Sun, Nov, 2, -240}; //Eastern Daylight Time = UTC - 4 hours
TimeChangeRule usEST = {“EST”, Third, Sun, Nov, 2, -300}; //Eastern Standard Time = UTC - 5 hours
Timezone usET(usEDT, usEST);

tmElements_t tm;

TimeChangeRule *tcr; // pointer to the time change rule, use to get the TZ abbrev
time_t utc;

void setup(void)
utc = now();


void loop(void)
utc = now();
time_t local = usET.toLocal(utc, &tcr);
Serial.print("Is DST in effect: ");

printTime(utc, “UTC”, " Universal Coordinated Time");
printTime(usET.toLocal(utc, &tcr), tcr → abbrev, " New York");

//Function to return the compile date and time as a time_t value
time_t compileTime(void)
#define FUDGE 25 //fudge factor to allow for compile time (seconds, YMMV)

char *compDate = DATE, *compTime = TIME, *months = “JanFebMarAprMayJunJulAugSepOctNovDec”;
char chMon[3], *m;
int d, y;
tmElements_t tm;
time_t t;

strncpy(chMon, compDate, 3);
chMon[3] = ‘\0’;
m = strstr(months, chMon);
tm.Month = ((m - months) / 3 + 1);

tm.Day = atoi(compDate + 4);
tm.Year = atoi(compDate + 7) - 1970;
tm.Hour = atoi(compTime);
tm.Minute = atoi(compTime + 3);
tm.Second = atoi(compTime + 6);
t = makeTime™;
return t + FUDGE; //add fudge factor to allow for compile time

//Function to print time with time zone
void printTime(time_t t, char *tz, char *loc)
Serial.print(’ ‘);
Serial.print(’ ‘);
Serial.print(’ ‘);
Serial.print(’ ‘);
Serial.print(’ ‘);
Serial.print(’ ');

//Print an integer in “00” format (with leading zero).
//Input value assumed to be between 0 and 99.
void sPrintI00(int val)
if (val < 10) Serial.print(‘0’);
Serial.print(val, DEC);

//Print an integer in “:00” format (with leading zero).
//Input value assumed to be between 0 and 99.
void sPrintDigits(int val)
if(val < 10) Serial.print(‘0’);
Serial.print(val, DEC);

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]`` [color=blue]// your code is here[/color] ``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Do this:

thank you that worked