Also have a look at the Time.h file that is part of that library, there are lots of useful functions and constants. There is also a handy struct called tmElements_t and functions to convert between it and a time_t (the Unix time timestamp).
It seems the library doesn't suit our purposes. We'll be coding our own. It is for PIC's, though, because this and a few other libraries where the only reason for us to use the Arduino.
Contains the number of the days, passed since 2000-01-01 (century day number). The cdn for 2000-01-01 is 0, for 2000-01-02 is 1. This is a read only variable. Do not write to this variable. Use the fill functions instead.
Range: 0..65535
if cdn is an uint8_t the range should be smaller, but as the range makes sense I assume cdn is a uint16_t
Insert Quote
Quote from: robtillaart on August 10, 2011, 12:53:21 PM
Convert both time to unix timestamps...
...which can be turned into days/hours etc
I was looking this up, and I couldn't find either of these conversion routines (I believe mktime and strftime) - are they part of Arduino?