RTC_PCF8583 library

Hi, I’m just trying RTC module with MightyCore (ATmega644). I’ve found this library.

It seems working well, but there is a problem with month and week day. I set time to 23:59:55 (11 pm) to test date function (date is for example 01/01/2000) but on 0:00:00 I won’t get what I expected. Week day is still the same, but date is 02/02/2000 instead of 01/02/2000.

I’ve got the same result on Arduino Uno with “set clock” example.

Does anybody know? This library looking so nice but…

Please post your sketch USING CODE TAGS(</> button on toolbar). Are you using the current version of the library from the BitBucket repository?

I'm using current version (but I tried previous version too). There is nothing special. It is sample code from library with week day printing.

#include <Wire.h>
#include <Rtc_Pcf8563.h>

//init the real time clock
Rtc_Pcf8563 rtc;

void setup()
  //clear out the registers
  //set a time to start with.
  //day, weekday, month, century(1=1900, 0=2000), year(0-99)
  rtc.setDate(1, 6, 1, 1, 10);
  //hr, min, sec
  rtc.setTime(23, 59, 55);

void loop()
  //both format functions call the internal getTime() so that the 
  //formatted strings are at the current time/date.