error accessing struct tm data from avr.libc time

J-M-L:
It might be confusing why we need to pass a pointer to the time_t value, I would guess that in the early days of computing the time() function could not directly return a long int and thus the data was passed by reference...

There were no long ints, so it was hidden as a struct. Same reason for size_t.

http://c-faq.com/lib/curtime.html

note the note.