Permalink
Browse files

Fixed dayOfWeek(), uses date2days instead of unimplemented secondstime()

  • Loading branch information...
1 parent 7c9a955 commit dfcc7d8657ebf9d10ccbfa33212c1bbeda02d56c @jpbot jpbot committed with ladyada Jul 12, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 RTClib.cpp
View
@@ -105,7 +105,7 @@ DateTime::DateTime (const char* date, const char* time) {
}
uint8_t DateTime::dayOfWeek() const {
- uint16_t day = secondstime() / SECONDS_PER_DAY;
+ uint16_t day = date2days(yOff, m, d);
return (day + 6) % 7; // Jan 1, 2000 is a Saturday, i.e. returns 6
}

0 comments on commit dfcc7d8

Please sign in to comment.