localtime_s converts a time_t value into broken-down local time and stores the result in an object supplied by the caller. It is an Annex K alternative to traditional interfaces that operate on global state. section 8.5
The interface
struct tm *localtime_s(time_t const timer[restrict static 1], struct tm result[restrict static 1]); The timer argument identifies the time_t value to convert; result identifies caller-provided storage for the broken-down local time. The conversion uses local time-zone assumptions, unlike gmtime_s, which expresses the result as UTC. Under normal circumstances, localtime_s and mktime are inverse operations. section 8.5
