This is basically the arduino.cc sample turned into a library for easier reusability. It's not perfect but it does the job. void clockWrite(byte year, byte month, byte day, byte wday, byte hours, byte ...