PaulStoffregen / Time

Time library for Arduino
http://playground.arduino.cc/code/time
1.25k stars 666 forks source link

Small bug in makeTime function #22

Open massaccim opened 9 years ago

massaccim commented 9 years ago

if tm.Day is zero when calling makTime(tm) the result is wrong. line: seconds+= (tm.Day-1) * SECS_PER_DAY;

should be:

if (tm.Day > 0) seconds+= (tm.Day-1) * SECS_PER_DAY;