time_t seconds = 100000;//количество секунд с 1970г
char buffer[40];
struct tm timeinfo;
localtime_s(&timeinfo, &seconds);
char* format = "%H:%M:%S";
strftime(buffer, 40, format, &timeinfo);
string dat = (buffer);
#include <iostream>
#include <iomanip>
#include <ctime>
int main()
{
std::time_t t = std::time(nullptr);
std::cout << "UTC: " << std::put_time(std::gmtime(&t), "%c %Z") << '\n';
std::cout << "local: " << std::put_time(std::localtime(&t), "%c %Z") << '\n';
}
struct tm * gmtime (const time_t * timer);