D1307 Time.h lib: weekday() always returning Thursday

Use the full setDateTime call, viz:

    setDateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second);

This lets you set all the registers. use a day value from 1 to 7 inclusive.

If you set it manually to just before midnight, you can then disable the setting (comment out the setDateTime call). Run your program a few minutes later and the day will have incremented.

a7