Localtime_r question


#1

What is the point of sending thelocaltime_r function the address of the structure that is calling it? For example.

struct tm now;
localtime_r(&secondsSince1970, &now);

Why does it need the &now? is there something Im missing?

thanks


#2

The function needs to know where the structure lives so that it can fill the structure with data.