C++ function that converts time(NULL) to local time
<p>In C++ I'm writing a function that converts time(NULL), which is all the seconds since January 1, 1970 in UTC time, to local time EST in military time format (hours:minutes:seconds). I'm honestly stumped how to mathematically do this so that the program stays accurate as time moves forward.</p>

<p>Also I'm well aware that there is a local time function but I'd like to build this function from the ground up. Does anyone have any advice or tips?</p>