From man gmtime
:
The
gmtime()
function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may returnNULL
when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. Thegmtime_r()
function does the same, but stores the data in a user-supplied struct.